“collection” is an object not an array so push method won’t work. “id” is a property within “collection” and “prop” is a property within an “id”. “value” is data you should insert somewhere in the object depending on the situation.
Small example of an object:
// an object property value property value
var cat = { "name": "Tom", "owner": "John" };
// output sample 1
console.log(cat["name"]); // outputs "Tom"
console.log(cat["owner"]); // outputs "John"
// output sample 2
console.log(cat.name); // outputs "Tom"
console.log(cat.owner); // outputs "John"
// output sample 3 - similar to what you'll be using
var variable1 = "name";
var variable2 = "owner";
console.log(cat[variable1]); // outputs "Tom"
console.log(cat[variable2]); // outputs "John"