I am aware there is push() to add oject into array. But how to add object into object.
var osubcategories = {};
for (var i=0; i<data.length; ++i){
var tempkey = data[i].scid; // here tempkey will be any number sat 15 20 30 etc
// how to add this tempkey along with true in osubcategories
}
I want output like this for each tempkey in loop:
osubcategories = {"15" : true, "23": true, "55" : true}