I have seen a discussion in this community about the difficulty in transforming nested XML Array elements. I don’t think that is limited to XML. I guess it is also for nested JSON Array object elements. Pardon me if my knowledge is limited and reiterating the difficulty in transforming nested array object elements.
I am attaching the pipeline and also sample input and expected output. The fields that required transformation are Region which is at top level array (customer) and Brand which is inside cars array within customer array.
We dont have issue in transforming at the top level array object, but when it comes to an array within array is where we face the problem. This just at 2nd level array itself where we dont have straight forward solution (to my knowledge). What if more levels of nested array’s present.PipelinewithSampleInputandExpectedOutput.zip (3.7 KB)
I have a complex solution for this ( where we make a copy / router and check if the Cars array object present, it do the lookup and transform and then use a join with the original input and set the transformed value in a mapper snap using sl.zip). But that is consuming more time if the nested structure grows.
Hence wanted to know if we have a simple solution for this.
Thanks and regards,