I have following arrays:
arrOne = [{id:1, name:"abc"},{id:2, name: "xyz"}]
arrTwo = [{id:1, school:"gem"},{id:2, school: "jyoti"}]
I want to have “name” field from arrOne to be added in arrTwo as follows:
final:
arrTwo = [{id:1, school:"gem", name: "abc"},{id:2, school: "jyoti", name:"xyz"}]
How can i achieve this in javascript?