What\'s the correct way to merge two arrays in Javascript?
I\'ve got two arrays (for example):
var a1 = [{ id : 1, name : \"test\"}, { id : 2, name :
Short ES6 solution
const a3 = a1.map(t1 => ({...t1, ...a2.find(t2 => t2.id === t1.id)}))