let's jump to the problem
// lets say i have a simple array of objects inside an object
const abc = {
a: 1,
b: [{aa: 1, bb: 2}, {aa: 2, bb: 2}]
}
// then I want to update the array with push a new object
abc.b.push({aa: 3, bb: 3})
But why it is resulting
{
a: 1,
b: [[Object], [Object], [Object]]
}
I expecting the result
{
a: 1,
b: [{aa: 1, bb: 2}, {aa: 2, bb: 2}, {aa: 3, bb: 3}]
}
The result I got with nodejs console.log(abc)