I have the following input data
[
{
"key": "a",
"value": [
"1"
]
},
{
"key": "a",
"value": [
"2"
]
},
{
"key": "b",
"value": [
"3"
]
}
]
and would like to merge the values into an array, grouped by the same key. i.e. the following desired output:
[
{
"key": "a",
"value": [
"1",
"2"
]
},
{
"key": "b",
"value": [
"3"
]
}
]
any help is appreciated thank you!