I have an array of object with keys and values. I want to change that array of object into label value. How can I do this ?
Current Array of object is:
const test = [{
"value": "ABC",
"key": "abc"
},
{
"value": "BCD",
"key": "bcd"
}
]
Expected Array of object:
const test = [{
"value": "ABC",
"label": "abc"
},
{
"value": "BCD",
"label": "bcd"
}
]
How can I get expected array of object using current array of object ?