js construct object with variable as key code example
Example: javascript variable as object key
var key = "happyCount";
var obj = {};
obj[key] = someValueArray;
myArray.push(obj);
var key = "happyCount";
var obj = {};
obj[key] = someValueArray;
myArray.push(obj);