This node transforms a JSON column into multiple columns by automatically inferring the structure of the
JSON data. It works best with well-structured, relatively flat JSON objects that follow a consistent schema
across all rows.
You can choose between two main extraction approaches. One option is to extract only the primitive leaf
values (such as strings or numbers), ignoring their full JSON paths. The other option is to retain the
complete JSON structure. However, keeping the full structure may lead to less intuitive results, since the
resulting columns can contain JSON values or collections of JSON rather than simple data types.
For example, consider JSON inputs like:
{"a": {"b": [1, 2], "c": "c"}}
{"a": {"b": [3], "d": null}}
If you extract only leaf elements and use their names as column headers, the output will include columns
such as:
b: either a JSON array or a list of integers, depending on whether arrays are preserved as
JSON or expanded into collections
c: string values
d: string values (with missing entries where not present)
If you instead limit extraction to a certain depth (e.g., level 1), you may end up with a single column
like a, which contains JSON objects rather than individual values.
Another option is to use full JSON paths as column names (for example, a.b.0, a.b.1,
a.c, a.d) and expand arrays into separate columns. This produces more granular columns,
such as individual elements of arrays and nested fields.
For more complex nested structures, behavior depends on additional settings:
If nested objects are omitted and only shallow levels are considered, arrays may be simplified to
lists of primitive values.
If nested objects are kept, arrays can contain mixed JSON elements (e.g., objects and numbers
together).
When preserving arrays as JSON, the output remains closer to the original structure regardless of
other settings.
This node is best suited for well-structured, relatively flat JSON data with a consistent schema across
rows. For more complex or deeply nested JSON, consider using JSON Path or JSON Path (Dictionary).
Options
JSON column
Name of the JSON column to expand.
Remove source column
When checked, the input JSON column is removed.
Expand to
Select which parts of the JSON structure to extract.
Leaves: Only the leaves are returned, no intermediate values are extracted (as JSON columns).
Level: The columns are generated only for paths with length up to this value (inclusive, starting from 1).
Maximum depth level
The columns are generated only for paths with length up to this value (inclusive, starting from 1).
Column names from
Select how to generate output column names from the JSON structure.
Leaf name: The output column name is the leaf's key, disambiguated by the numbers with (#1)/(#2)/...
Path with separator: The output column name will be created from the JSONPaths found, separating the parts of the path with this
value.
Path separator
Separator used to split the path into segments.
Arrays as
Choose how to handle JSON arrays in the input data.
Collections: The JSON arrays are not expanded, but returned as KNIME collections.
JSON arrays: The JSON arrays are not expanded and kept as such.
Columns: The JSON arrays are expanded to columns, one for each value. (This might create a lot of columns.)
Omit nested objects
Nested objects in arrays are not included in the output when checked (except when the output column is a
JSON column). This is sometimes desirable as sub-objects are extracted into separate levels.
Consider an example input table with the following JSON rows:
{
"Array object":
[1, 2, 3]
}
{
"Array object":
[4, {"Nested object": 5}]
}
If you set the expansion level to 1, extract the column names from the leaf names, and process arrays as
collections, column Array object will contain
[1,2,3], [4] if "Omit nested objects" is selected
[1,2,3], [4, {"Nested object": 5}] if "Omit nested objects"
is not selected
Input Ports
Table containing JSON column.
Output Ports
Table with values extracted from the selected JSON column.