Is there a function I can import for converting a plain javascript hash/object into a query string?
So, here are the requirements:
- Cannot be based on jQuery (I need fastboot support)
- Must support nested objects & arrays.
- Must be built into Ember framework (no plugins)
I'm not really wanting to have another plugin dependency, since I know this is done internally in Ember.
Update To clarify what I mean by nested: an object with nested array or object properties will convert to the bracket syntax that Rails is familiar with:
{my_values: [1,2]} => ?my_values[]=1&my_values[]=2
{nested: {key: value}} => ?nested[key]=value