I don't actually want to make any calls to a website but I have to take this GET request and turn it into a JSON object.
?goal=NOT_GOAL_SETTING&kpi=lfa&sec_kpi=not_being_used&numdays=31&budget=13000000&channel=not_being_used&channel_max=not_being_used&brand=Ram&nameplate=namplate1_nameplate2_&target=800000&nameplate_min_spend=0_0_0_0_0_0_0&nameplate_max_spend=0_0_0_0_0_0_0&max_lfas=70000_100000_4000_400000_90000_15000_2000&search_digital_min_spend=0_0&search_digital_max_spend=0_0&search_digital_min_lfas=0_0&search_digital_max_lfas=0_0
I want every variable that is defined after the =
and I want to split the variables by _
.
A smaller request is like this-
?variable1=1_2_3_4&variable2=string
What I want is the following:
{"variable1":[1,2,3,4], "variable2":"string"}