/* FOR ES6 and Babel */
{
[yourKeyVariable]: someValueArray,
}
//for older versions
var key = "happyCount";
var obj = {};
obj[key] = someValueArray;
myArray.push(obj);
const yourKeyVariable = "key";
const value = ...;
const obj = {
[yourKeyVariable]: value,
}
var key = "happyCount";
myArray.push( { [key] : someValueArray } );