Add JavaScript object to JavaScript object
var jsonIssues = []; // new Array
jsonIssues.push( { ID:1, "Name":"whatever" } );
// "push" some more here
As my first object is a native JavaScript object (used like a list of objects), push
didn't work in my scenario, but I resolved it by adding new key as follows:
MyObjList['newKey'] = obj;
In addition to this, may be useful to know how to delete the same object as inserted before:
delete MyObjList['newKey'][id];
Hope it helps someone as it helped me.