How does js modify the key value of an object?

original data

var array = [
    {
        id:1,
        name:""
    },
    {
        id:2,
        name:""
    }
];

data I want to change:

var array = [
    {
        value:1,
        label:""
    },
    {
        value:2,
        label:""
    }
];
The corresponding value of

remains the same, but the name of key is changed. How to implement it with js?

Mar.31,2021

var arr = [
                {
        id:1,
        name:""
    },
    {
        id:2,
        name:""
    }
            ];
            var newArr = arr.map(function(item) {
                return {
                    value: item['id'],
                    lable: item['name']
                }
            })
            console.log(newArr) 
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-1b40d51-2bd91.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-1b40d51-2bd91.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?