Could you tell me how to merge the objects in the array?

how can
[{"id": "1"}, {"id": "2"}]
merge with
[{"user": "admin"}, {"user": "admin2"}]
into
[{"id": "1", "user": "admin"}, {"id": "2", "user": "admin2"}]

Mar.12,2021

var array1 = [{"id":"1"},{"id":"2"}];
var array2 = [{"user":"admin"},{"user":"admin2"}];
array1.map(function(elem, index) {
    elem = Object.assign(elem,array2[index]);
    return elem;
})
console.log(array1);

let arr1= [{"id": "1"}, {"id": "2"}, {"id": "3"}];
let arr2= [{"user": "admin"}, {"user": "admin2"}];
const len = arr1.length > arr2.length? Arr1.length: arr2.length;
let arr3= [];
for (let iTunes < len;iPP) {

arr3.push(Object.assign(arr1[i] || {},arr2[i] || {}))

}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a893-2c227.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a893-2c227.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?