Is there an easy way to merge object arrays using javascript ellipsis or similar?
let arr = [ {id: 1, data: {foo: "bar 1"}}, {id: 2, data: {foo: "bar 2"}} ]; //In case the ID does not exist just add as a new element on the array arr = [...arr, {id: 3, data: {foo:…