How does js convert a two-dimensional array to an object?

the format of the two-dimensional array is as follows:

[["num1","num2","num3","num4"],["1","2","3","4"],["1","2","3","4"],["1","2","3","4"],["1","2","3","4"]];

requires that each item with an index of 0 be used as the key value and the character in the corresponding position after
as the value.

the format of the output is

{
    num1:["1","1","1","1"],
    num2:["2","2","2","2"],
    num3:["3","3","3","3"],
    num4:["4","4","4","4"]
}

ask for help, should you change it this way?

< H2 > Thank you first. < / H2 > < hr >

clipboard.png



,

    const crr=[["num1","num2","num3","num4"],["1","2","3","4"],["1","2","3","4"],["1","2","3","4"],["1","2","3","4"]];
    const drr=crr.reduce((pre,cur,i,arr)=>{
        if(i===4) return pre
        pre[arr[0][i]]=arr.reduce((pre1,cur1,j)=>{
            if(j===0) return pre1
            return pre1.concat(cur1[i])
        },[])
        return pre
    },{})
    console.log(crr,drr)
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-1ea69ad-1de7.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-1ea69ad-1de7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?