Hub
Pricing About
  • Software
  • Blog
  • Forum
  • Events
  • Documentation
  • About KNIME
  • KNIME Community Hub
  • Nodes
  • JSON to Table
NodeNode / Manipulator

JSON to Table

Structured Data JSON
Drag & drop
Like
Copy short link

Converts a JSON column to multiple columns, whereby the column list is heuristically extracted from the JSON structure. It can either extract the primitive leaf elements (like strings and numbers), omitting the JSON tree path, or the full JSON structure. The latter, however, may yield some confusing output as the types of the columns are again JSON or collections of JSON.
Note that this node is meant to be used for "well-structured", relatively flat JSON objects which adhere the same schema in all rows. In case the JSON objects are more complex it's better to use nodes like JSON Path or JSON Path (Dictionary) .
Some examples on the following JSON column input may help to clarify the generated output.

JSON
{"a": {"b": [1, 2], "c":"c"}}
{"a": {"b": [3], "d":null} }
Some options with their results: Only leaves , Use leaf name (uniquify with (#1)/(#2)/...)
Types:
  • b - JSON when Keep as JSON array , list of integers when Keep as collection elements
  • c - String
  • d - String
(The actual order of the columns might be different.)
b c d
[1,2] c ?
[3] ? ?
Only up to level 1 , Use leaf name (uniquify with (#1)/(#2)/...)
Type: a - JSON
a
{"b": [1, 2], "c":"c"}
{"b": [3], "d":null}
Only leaves , Use path with separator . , Expand to columns
Type:
  • a.b.0 , a.b.1 - integer
  • a.c , a.d - string
a.b.0 a.b.1 a.c a.d
1 2 c ?
3 ? ? ?
For nested objects, see the following example:
JSON
{"a":[{"b": 3}, 4]}
{"a":[1]}
Only up to level 1 , Use leaf name (uniquify with (#1)/(#2)/...) , Omit nested objects , Expand to columns :
Type:
  • a - list of integers
a
[4]
[1]
Only up to level 1 or 2 , Use leaf name (uniquify with (#1)/(#2)/...) , do not Omit nested objects , Expand to columns :
Type:
  • a - list of JSON values
a
[{"b": 3}, 4]
[1]
Please note that in the first row the value is a KNIME list of the two JSON values: {"b": 3} and 4 , not a single JSON value, similarly in the second row, you get a KNIME list of a single JSON value: 1 .
Though with Keep as JSON array (regardless of Omit nested objects ):
Type:
  • a - JSON values
a
[{"b": 3}, 4]
[1]

Node details

Input ports
  1. Type: Table
    JSON
    Table containing JSON column.
Output ports
  1. Type: Table
    Extracted values
    Table with values extracted from the selected JSON column.

Extension

The JSON to Table node is part of this extension:

  1. Go to item

Related workflows & nodes

  1. Go to item
  2. Go to item
  3. Go to item
  1. Go to item
  2. Go to item
  3. Go to item
  4. Go to item
  5. Go to item
  6. Go to item

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • E-Learning course
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • KNIME Open Source Story
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more on KNIME Business Hub
© 2023 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Credits