📅  最后修改于: 2022-03-11 15:01:28.240000             🧑  作者: Mango
//You need to make the object first, then use [] to set it.
var key = "happyCount";
var obj = {};
obj[key] = someValueArray;
myArray.push(obj);