how to merge two duplicate values array of objects in javascript 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))];