I have multiple Json paths Nodes, which all operate on different Json objects, I would like to always use the name of the 1st output column in this example “col_name” (they change) and use it in a String Manipulation Node afterwards, is there any of passing this name as a variable out of the Json Path Node / Table
The best way I can think of right off the top of my head would be to use the “extract column headers” node from the output, then use the table row to variable from those headers to have a list of all your column names as variables.
you can create flow variables from configuration options under Flow Variables tab. Just add text (which will be new variable name when node successfully executed) into blank text box next to configuration you are interested in. See example:
In your case you will have all new column names in one array flow variable. Then use following approach to have only first column as string flow variable:
Thanks, this was exactly what I was looking for!
I thought about reducing the amount of nodes a little bit and replace your 3 nodes with something like a Java Edit Variable or a Variable Expressions, however the “newcolName” Variable only appears in the Variable to Table Row node. I dont really get why, can you tell me why?
Regarding flow variables type array - that is new flow variable type and still not available in each node. However there is a ticket to enable it in nodes you mentioned (both Java Edit Variable and Variable Expressions) so I will give them +1 for you