const a =[{name: 'a1'}, {name: 'a2'}] let b =[{name: 'b1'}, {name: 'b2'}] b = b.map((el, i) => { el.a = a[i] return el }) console.log(b)