Can anyone help me with reformatting the JSON data below?
[
{
"name": "Hello",
"value": 1
},
{
"name": "Hello",
"value": 11
},
{
"name": "Bye",
"value": 2
},
{
"name": "Bye",
"value": 22
}
]
I want to transform it into the following format:
[
{
"Hello": 1,
"Bye": 2
},
{
"Hello": 11,
"Bye": 22
},
]
I'm struggling with this task and unsure about the approach. Can this be achieved using Lodash or pure JavaScript?