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