I have an object:
var JSONObject = {
"thing": {
"array": [{
"a": "aaa"
}]
}
};
And I'm trying to push another object here:
var JSONObject = {
"thing": {
"array": [{
"a": "aaa",
"NEW THING": "GOES HERE"
}]
}
};
Normally, you would do:
JSONObject.thing.array.push({"NEW THING": "GOES HERE"})
But in this case I can't do that, since there's no real handle to the object; it's undefined.
Any ideas would be greatly appreciated!
Thanks.