parsing JSON data from Rest API

Trying to fetch data from a rest API - link deleted by mods to remove API key

Knime AP , “Get Request” node identifies the data as JSON, but the data actually seems to be comma separate.
How do I use JSON Path node to manipulate this data? or should I use some other node?

Hi @ravidya_rev

It is in fact a JSON, it just contains a long list of different objects which are separated by comma. What you need to use in this case are collection query’s that look for the elements like;

$[*][0]
$[*][1]
$[*][2]

Meaning that for every object, the [0] represent the NAME, [1] represents S1501_C01_001E, etc, etc. The JSONPath node highlights in blue which values will extracted based on the given query.

After the JSONPath node, use an Ungroup node.

It’s not very common that the headers are also included as object, so you can filter those out with a row filter.

Final result:

Hope this helps!

PS1: I recommend removing the link from your original post. It contains a token key which can be abused.

1 Like

Good catch @ArjenEX! I’ll edit the OP.

1 Like

Thank you @ArjenEX & @ScottF !

1 Like

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