Is there a way I can make A to B using lodash? Appreciated.
A - Original array looks like below.
[
{
"customerId": 5458122321,
"customerName": "C1"
},
{
"customerId": 5461321801,
"customerName": "C1"
},
{
"customerId": 5434315807,
"customerName": "C2"
}
]
B - and I want it to be something like below.
[
{
"customerId": [5461321801, 5458122321]
"customerName": "C1"
},
{
"customerId": [5434315807],
"customerName": "C2"
}
]