Hello everyone,
I’m trying to work with a JSON file coming from an API.
The JSON has a hierarchical structure, with nested objects inside children
arrays, sometimes across multiple levels. For example: a page contains blocks, which contain components, which in turn contain elements, and so on.
My initial approach was to use an Array Aggregator combined with an Iterator to loop through each level.
However, since the JSON can be quite large (with potentially hundreds of elements and sub-elements) and its structure is dynamic, this method would consume far too many operations.
I then switched to a solution based on flatten(map(...))
to flatten each level.
My main issue now is this: I would like to keep the parent information for each flattened element (such as parent_id
and parent_name
), but I haven’t been able to do it successfully.
I’ve tried several methods, but nothing seems to work.
Do you have any ideas or suggestions on how to approach this?
Thanks so much in advance for your help
Exemple.json (2.8 MB)