how to merge 2 array of objects in javascript without duplicates code example
Example: javascript merge arrays of objects without duplicates
var merged = [...initialData, ...newData.filter(d => !ids.has(d.ID))];
var merged = [...initialData, ...newData.filter(d => !ids.has(d.ID))];