Is there a way in javascript to create an Object with keys as numbers and values as arrays of objects?
I am aiming to generate an object structured like this:
{Key: "1", value: [Object, Object, ...], key: "2", value: [Object, Object, ...], key:"N", value: [Object, Object, ...]}
Can this be achieved in javascript/typescript? If so, how?
I attempted the following code:
let myObj = {};
myObj["1"] = myObj["1"].push(Object)
However, the above code does not seem to be functioning as expected.