My JSON input has nested arrays and thus I flattened it for ease of renaming and setting. Is there a items to JSON unflattening node?
Step 1) IP:
[
{
name: “Jam”,
cars: [“Honda”, “BMW”]
},
{
name: “Mat”,
cars: [“Toyota”]
}
]
Step 2) Flattened transformed intermediate data structure I have:
[
{
name: “JAM Good”,
car: “HONDA”
},
{
name: “JAM Good”,
car: “BMW-3”
},
{
name: “Mat”,
car: “TOYOTA”
}
]
Step 3) Desired O/P .json local file content:
{
name: “JAM Good”
cars: [“HONDA”,“BMW-3”]
},
{
name: “Mat”,
cars: [“TOYOTA”]
}
Kindly note, I simplified the data above to get the message across. The actual IP and transformations are complex but in essence I need to go from step 2 to 3.
Thank you,