javascript merge two arrays of objects without duplicates es6 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))];