I used unwind aggregation but I am with an error I need output like. the remaining data is also in the same format
[
{
"_id": "767",
"customId": [
"growth",
"fine"
],
"length": [
1526,
95
]
},
{
"_id": "66",
"customId": [
"height",
"good"
],
"length": [
86,
68
]
}
]
I used unwind aggregation but I am with an error I need output like. the remaining data is also in the same format
[
{
"_id": "767",
"merged": [
{
"customId": "growth",
"length": 1526
},
{
"customId": "fine",
"length": 95
}
]
},
{
"_id": "66",
"merged": [
{
"customId": "height",
"length": 86
},
{
"customId": "good",
"length": 68
}
]
}
]
I am using postman to know whether it is working or not