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 name | path | type |
|---|---|---|
| bookyear | $.book[*].year | List(Double) |
| invalidyear | $.book[2].year | Double |
| timeline | $.book[?(@.year==1999)].title | String |
| paths | $..* | List(Path) |
{"book": [
{"year": 1999,
"title": "Timeline",
"author": "Michael Crichton"},
{"year": 2000,
"title": "Plain Truth",
"author": "Jodi Picoult"}
]}
The results look like this:
| bookyear | invalidyear | timeline |
|---|---|---|
| {1999, 2000} | ? | Timeline |
$['book'], $['book'][0], $['book'][1],
$['book'][0]['year'], $['book'][0]['title'], $['book'][0]['author'],
$['book'][1]['year'], $['book'][1]['title'], $['book'][1]['author']Base64, Boolean, Double, Integer, Json, Long, String, Path. List(*) and Set(*) wrappers are also supported (e.g. List(Double)).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.
To use this node in KNIME, install the extension KNIME JSON-Processing from the below update site following our NodePit Product and Node Installation Guide:
A zipped version of the software site can be downloaded here.
Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!