_mercury – 00-31 Sep 2

I have an array of objects ==> Object like photo {value:123, label: 'foo'} I want to use array.map to get only the value and rename the key to id ?
UU
Unknown User595d ago
M
_mercury595d ago
I did that ( no luck)
const attrs = selectedAttributes.map((attr) => ({
id: attr.value
}));
const attrs = selectedAttributes.map((attr) => ({
id: attr.value
}));
M
_mercury595d ago
UU
Unknown User594d ago
M
_mercury594d ago
results
UU
Unknown User594d ago
M
_mercury594d ago
yes
UU
Unknown User594d ago