how to merge two array of objects into single array and object using javascript
I would like to know how to merge two array of objects into single array using javascript var arr1 = [ {id:1, name: "xxx"} ] var arr2 =[ {details:"finance", cost:"100"} ] Tried. var result1 = [...arr1, ...arr2]; var result=Object.assign({}, ...result1)…