The operation of the array, I want to convert one number of the array into two new arrays, how to achieve it?

current array

         let arr=[
                    {id:1,name:"",age:18},
                    {id:2,name:"",age:19},
                    {id:3,name:"",age:25},//
                    {id:4,name:"",age:20},
                    {id:5,name:"",age:15},
                    {id:6,name:"",age:252},//
                    {id:7,name:"",age:8},
                    {id:8,name:"",age:9},
                    {id:9,name:"",age:5}//
                ];

I want to change to the following two arrays

    let arr1 = [//
                    {id:1,name:"",age:18},
                    {id:2,name:"",age:19},//
                    {id:4,name:"",age:20},
                    {id:5,name:"",age:15},//
                    {id:7,name:"",age:8},
                    {id:8,name:"",age:9}//
                ];
       let arr2 =[//
                     {id:3,name:"",age:25},//
                     {id:6,name:"",age:252},//
                     {id:9,name:"",age:5},//
                ]
Dec.24,2021

let arr1 = arr.filter(v => v.name !== '');
let arr2 = arr.filter(v => v.name === '');

var newArr1 = [];
            var newArr2 = [];
            textArr.forEach(function(i){
                if(i.name===""){
                    newArr1.push(i);
                }else{
                    newArr2.push(i);
                };
            });
            console.log(newArr1,newArr2)
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-1be9003-46985.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-1be9003-46985.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?