The problem of merging javascript Multidimensional arrays according to key values

                var arr = [{
                    key: 1,
                    name: 2,
                    job: 3
                }, {
                    key: 1,
                    name: 22,
                    job: 33
                }, {
                    key: 2,
                    name: 222,
                    job: 333
                }, {
                    key: 2,
                    name: 2222,
                    job: 3333
                }];
The

arr array has multiple fields, and I want to merge them based on the same property of the key field.
the final result you want to achieve, such as arr2

    arr2 = [{
                    key: 1,
                    info: [{
                        name: 2,
                        job: 3
                    }, {
                        name: 22,
                        job: 33
                    }]
                }, {
                    key: 2,
                    info: [{
                        name: 222,
                        job: 333
                    }, {
                        name: 2222,
                        job: 3333
                    }]
                }];
Apr.09,2021

let resultArr=[];//
arr.forEach(item=>{
    
    //,filter
    let fltrArr=resultArr.filter(_item=>_item.key==item.key);
    //=>=>filter()infopush 
    //name,job,filterresultArr
    fltrArr.length==0?
    resultArr.push({key:item.key,info:[{name:item.name,job:item.job}]})
    :fltrArr[0].info.push({name:item.name,job:item.job})
    
})

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-1b3f9f6-2c4c4.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-1b3f9f6-2c4c4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?