Need help with an object

Need help with an object

I am getting data from an API cross browser.

Firstly I want to get the values from the URL or form, store it in an object then pass the object in as data to my ajax call.

However when I look at the request it is encoding the commas and adding room1 to each of the values I need to pass.

Can anyone help?

my object is

var data= {
       room1:[3,12,11]
}

the request:   &room1%5B%5D=3&room1%5B%5D=12&room1%5B%5D=11


I need to see &room1=3,12,11