JavaScript merging objects by id May 5, 2022 by Tarik Short ES6 solution const a3 = a1.map(t1 => ({...t1, ...a2.find(t2 => t2.id === t1.id)}))