I have the following array of objects:
const values = [
{
clientType: "Client Type 1",
value: 130
},
{
clientType: "Client Type 2",
value: 10
},
{
clientType: "Client Type 3",
value: -80
},
{
clientType: "Client Type 4",
value: -52
}
]
I want to "map" this array and get as a result the following oject:
results = {
"Client Type 1": 130,
"Client Type 2": 10,
"Client Type 3": -80,
"Client Type 4": -52,
}
Is there a way of doing this directly? (Using only one map function)
TIA