How to iterate through a json file to get the list of values corresponding to the each field

I had used JSON path to get list of elements related to file_name(JSON field). PFA Json file for reference.
Any suggestions will be really helpful to get the expected output from the attached JSON file.

sample_knime.json (844 Bytes) output_expected

Can you clarify what’s the actual problem you are having with the workflow in the screenshot you posted?


Hi @elsamuel

My understanding is on JSON Path node is we can’t loop through the JSON Array for each iteration. If there is any way we can iterate the JSON Array of JSON object in JSON path it will be helpful to achieve my expected output.
json_read.knwf (21.7 KB)
PFA workflow used to read the json file. output of ungroup node is like below.

I need help on getting output similar to

I need to create a table with field_name with it’s corresponding file name, datatype and metatype. By using the attached json file i need to get output as mentioned above, any suggestions will be helpful

Here’s what I’ve come up with that gives the desired output:

The basic idea is to work through the JSON file in stages. Hopefully this works when applied to a longer JSON file.


Hi @elsamuel It worked and got to know what I missed in my implementation.
Thanks you for sharing the WF, learnt few :slight_smile:


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.