how do you assign a user key to a value to an object code example
Example 1: variable key name js
//You need to make the object first, then use [] to set it.
var key = "happyCount";
var obj = {};
obj[key] = someValueArray;
myArray.push(obj);
Example 2: js variable for key obj
{
[yourKeyVariable]: someValueArray,
}