Lets say I have the following array structure:
"stores" : [
{
id: 1,
name: 'lopd',
},
{
id: 2,
name: 'abc'
}
]
And I want to change the parameter names to following:
"stores" : [
{
value: 1,
label: 'lopd',
},
{
value: 2,
label: 'abc'
}
]
How would I do this in ES6?