I want to update (replace) the objects in my array with the objects in another array. Each object has the same structure. e.g.
var origArr = [
Try this approach with ES-6 Set Data Structure: const result = [...new Set([...origArr, ...updatingArr])]
const result = [...new Set([...origArr, ...updatingArr])]