Weekend challenge, parse JSON using variables

Hello @fseck , @ArjenEX , knimers

Despite the topic is closed; I came up with this solution late yesterday, but i interpreted the challenge to make it work with ‘n’ output queries…

The current solution that I came up, is the lower branch in my workflow; but I couldn’t make it work with variables (upper branch). I’ve tested it with and without quota characters, scape bars…

Does anyone in forum actually knows how to configure variables for the ‘JSON Paths’ node? Thx in advance.

20221103_parse_json.knwf (98.7 KB)

BR

Hi @gonhaddock

It all depends on your configuration. Your path variable is correct but if you just the leave the upper JSON Path empty, you need to make almost all fields variable controlled to make it work since it’s mandatory information to have for the node.

Doing so, the path node will start working:

I took the settings from the lower node, outputted them as flow variable (reference) and connected it to the upper to play around. This is the syntax of all flow variables that are used:

image

For the time being, I would just add those additional ones as constants in your metanode. For example with a CE. The groupBy already takes care of converting to list.

You should get all the required information pretty quickly afterwards. I would compare your metanode output with the flow variable from the lower path node (beforementioned image) and go from there.

Hope this helps!

2 Likes

Thank you @ArjenEX

I’ve learnt a very handy hack about working with variables. This will facilitate my life dealing with complex variables from now on.

And the the compulsory uppermost ‘input.column’ variable, it was in fact the main reason why I couldn’t make it work. I couldn’t figure out by my own.

Keep in good shape. BR

1 Like

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