1var arr1 = [{name: "lang", value: "English"},{name: "age", value: "18"}];
2var arr2 = [{name : "childs", value: '5'}, {name: "lang", value: "German"}];
3
4Array.prototype.push.apply(arr1,arr2);
5
6console.log(arr1); // final merged result will be in arr1
1const object1 = {
2 name: 'Flavio'
3}
4
5const object2 = {
6 age: 35
7}
8const object3 = {...object1, ...object2 } //{name: "Flavio", age: 35}
9
1Object.keys(arrayObject).map(key=>arrayObject[key]).reduce((old,item)=>(
2 {...old,...item}
3),{})
1var arr1 = new Array({name: "lang", value: "English"}, {name: "age", value: "18"});
2var arr2 = new Array({name : "childs", value: '5'}, {name: "lang", value: "German"});