08-13-2024 01:47 PM - edited 08-16-2024 09:00 AM
Hi team,
I would like to iterate thru an array of objects and verify if the objects has same num, code and date with different boxNumbers, then I should add the boxNumbers together and make that as a single object. If those three didn't match I should leave the object as is. Could you please help me on this?
Sample Input data:
[
{
"product": [
{
"num": "69315013901",
"code": "C06024",
"date": "2026-03-31",
"boxNumber": [
"453215578875",
"964070610419"
]
},
{
"num": "69315013901",
"code": "C06024",
"date": "2026-03-31",
"boxNumber": [
"153720699865",
"547398527901",
"994797055803"
]
},
{
"num": "69315030805",
"code": "083L022",
"date": "2025-11-30",
"boxNumber": [
"VUANJ6KYSNB",
"DPPG4NWK695"
]
}
]
}
]
Expected Output:
[
{
"product": [
{
"num": "69315013901",
"code": "C06024",
"date": "2026-03-31",
"boxNumber": [
"453215578875",
"964070610419",
"153720699865",
"547398527901",
"994797055803"
]
},
{
"num": "69315030805",
"code": "083L022",
"date": "2025-11-30",
"boxNumber": [
"VUANJ6KYSNB",
"DPPG4NWK695"
]
}
]
}
]
Solved! Go to Solution.
08-14-2024 12:40 AM
Hello @lake,
Attached is the sample pipeline for structuring the data as needed:
Let me know if you have any questions.
Best regards,
Aleksandar.
08-14-2024 12:40 AM
Hello @lake,
Attached is the sample pipeline for structuring the data as needed:
Let me know if you have any questions.
Best regards,
Aleksandar.