I am trying to send an array to my server using jsonp. Here is an example of the JSON I want to pass:
["something","another_thing",4,{"iam" : "anobject"}]
However, I am unsure about how to actually pass an array.
I thought it might work like this:
something&another_thing&4&[iam]=anobject
But when I try to parse that with querystring.parse()
in node, I get the following result:
{ '4': '', something: '', another_thing: '', '[iam]': 'anobject' }
This is not what I was expecting. I could just use JSON, but now I'm curious if passing an array this way is even possible.