Reputation: 8388
I know that the standard method for passing named parameters in a get request, is:
?paramName=value&anotherParam=anotherValue...
In my case, I want to pass an array of parameters However, I want to pass multiple parameters with the same meaning - an array. In js that would be
var users = ['bob', 'sam', 'bill'];
and I want to pass the users array via get.
What would be the way to accomplish this?
Upvotes: 2
Views: 159
Reputation: 490481
You will need to serialize them into some form of string that can be re-parsed into an array.
For, example, you could use...
?param[]=a¶m[]=b¶m[]=c
...or something like...
?params=[a][b][b].
Upvotes: 1