JSON Path (Dictionary)

Collects the parts specified by JSONPaths from a JSON column. For those parts that cannot be found or have incompatible types, missing values will be returned.

Example input table:
column namepathtype
bookyear$.book[*].yearList(Double)
invalidyear$.book[2].yearDouble
timeline$.book[?(@.year==1999)].titleString
paths$..*List(Path)
Example input:
{"book": [
    {"year": 1999,
     "title": "Timeline",
     "author": "Michael Crichton"},
    {"year": 2000,
     "title": "Plain Truth",
     "author": "Jodi Picoult"}
]}
The results look like this:
bookyearinvalidyeartimeline
{1999, 2000}?Timeline
The paths column contains the following values (String list): $['book'], $['book'][0], $['book'][1], $['book'][0]['year'], $['book'][0]['title'], $['book'][0]['author'], $['book'][1]['year'], $['book'][1]['title'], $['book'][1]['author']

Options

JSON column
The name of the JSON column to extract content from the first input table.
Remove source column
When checked, the source column will be removed from the output table.
JSONPath
The name of the JSONPath column from the second input table.
Type of column
The name of the type column from the second input table. The content should be one of these values in each row: Base64, Boolean, Double, Integer, Json, Long, String, Path. List(*) and Set(*) wrappers are also supported (e.g. List(Double)).
Output name
The name of the new output column from the second input table. In case of conflict, a new column name will be generated.

Input Ports

Icon
Table containing JSON column.
Icon
Table containing JSONPath, type and output column name definitions.

Output Ports

Icon
Table with extracted columns appended.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.