A newbie question from me, please.
I have a large data set that I prefer to be submitted as an object instead of an array; e.g.
foo = bar = baz = {}; $.ajax({ url: 'index', type: 'post', data: { foo: foo, bar: bar, baz: baz }, dataType: 'json' });
Upon submit, Firebug tells me that I have submitted:
bar [object Object] baz [object Object] foo [object Object]
What I want is to be able to access the contents of foo, bar, baz (contrived example, of course).
Is this possible in Javascript? Or do I need to use arrays, which I do not prefer?
No. Everything that is submitted via HTTP is basically a string or an array of strings. You can use JSON to convert each object into a string representation, which may be what you want.