I have an object like this:
obj = {"arr1" : [], "arr2" : ['z1', 'z2', 'z3'], "arr3" : []};
obj['arr2']['z2'] = 'z8';
It has nested arrays, and each value of can be an object with or without arrays, etc.
How to get a JSON for that? JSON.stringify would lose 'z8' value.
arr2
should be an object, not an array. – VisioN Dec 20 '12 at 12:08key:value
, Arrays never do. – Cerbrus Dec 20 '12 at 12:11