My problem is when I add a new object to an array object, the last object fields overwrite the other objects fields. At the end, all objects become the same. Here is the example
array=[{id:1 names:[john,james,alice]},
{id:2 names:[lisa,carlos,josh]}]
var obj={id:3 names:[david]}
array.push(obj)
console.log(array)
//=> [{id:1 names:[david]},
{id:2 names:[david]},
{id:3 names:[david]}]
I am having the same problem when try to delete one of them. What are your suggestions?
