Maybe I overlooked something in my JavaScript knowledge and I'm just realizing it now.
I was experimenting with this code snippet in the Chrome console:
a = [];
a.name = "test";
JSON.stringify(a);
// this returns []
a = new Object();
a.name = "test";
JSON.stringify(a);
// this returns {"name":"test"}
What is the difference between these two approaches? I remember thinking that using new Object() was specific to Microsoft JScript - am I mistaken? Looks like there might be a detail in a spec that I missed. Thanks for any insights!