I am trying to ungroup a JSON file with an embedded list and I want each “row” of the result to contain all the other elements of the JSON. I am able to extract and group the lower level list on its own but don’t know how to get the rest re-attached.
Ultimately this is going to a table format, so if that can be accomplished without this intermediate JSON format, that’s good too. Right now I am losing column1 and column2 with my ungroup function.
You are right on both counts. It may not work in the much more complex environment of my application, but it does provide inspiration because I can see how many of these functions work. This is basically a text manipulation solution, where I need a more generic JSON based solution that multiplies rows for an embedded list with multiple entries.
A co-worker came up with something that might work, and I will put it here if I can confirm it.
If you use the JSON Path node, you can extract column 1 and 2 from the JSON into a table. At the same time you can extract the list with the add collection query option. This will add the list as list item, which you can then ungroup. The columns 1 and 2 will stay attached this way. JSON ungroup.knwf (9.2 KB)