I have two arrays of objects:
array1 = [{id : 1, pop: 4000}, etc.]
array2 = [{id : 1, size: 2000}, etc.]
I would like to merge the two arrays (on id) for:
merged = [{id :1, pop: 4000, size: 2000}, etc.]
I saw extend
and other options like concat
but nothing quite what I was going for