JSON node

JSON Break

Break a JSON structure into individual output ports -- one for each top-level key or array index. This is the inverse of JSON Object and JSON Array.

Inputs

PortTypeDefault
InputThe object or array to split open — one level deep. Each key, or each array position, becomes its own output port, in the source order.json—
Clean PortsRemoves leftover ports whose keys are gone from the current data. Off keeps them as ghosts so cables survive when the structure briefly changes; switch it on once to tidy up.boolfalse

Screenshots

JSON Break Node
JSON Break Node

Overview

JSON Break decomposes a JSON object or array one level deep. For objects, each key becomes a named output port. For arrays, each element becomes an indexed output port ([0], [1], [2], ...). The output port types are automatically detected based on the values (float, int, string, bool, json).

When the input structure changes shape (keys added or removed), ports update dynamically. A ghost port mechanism preserves existing cable connections even when a key temporarily disappears, so reconnection is not needed if the key returns.

The Clean Ports input removes ghost (disconnected, stale) ports when set to true, forcing a fresh port layout.

JSON strings are automatically parsed — if you connect a raw JSON text string, it will be deserialized before breaking.

Examples

Break an object:

Input: {"x": 1.0, "y": 2.5, "name": "point"}

Creates three output ports:

  • x (float): 1.0
  • y (float): 2.5
  • name (string): "point"

Break an array:

Input: [10, 20, 30]

Creates three output ports:

  • [0] (int): 10
  • [1] (int): 20
  • [2] (int): 30

Nested values stay as JSON:

Input: {"position": {"x": 0, "y": 1}, "tags": ["a", "b"]}

Creates two output ports:

  • position (json): {"x": 0, "y": 1}
  • tags (json): ["a", "b"]

Nested structures remain as JSON — chain another JSON Break or use JSON Get for deeper access.

Use Cases

  • Decomposing OSC or TCP message payloads into individual values
  • Extracting fields from parsed JSON data for use by other nodes
  • Splitting a configuration object into separate control signals
  • Breaking apart EEG electrode data objects into per-channel streams

Tips

  • JSON Break only goes one level deep. For nested access, chain multiple JSON Break nodes or use JSON Get with a path.
  • Key order from the input is preserved in the output port layout (when using OrderedJSON sources).
  • Ghost ports keep your cables intact when the data structure fluctuates. Enable Clean Ports only when you want to reset the layout.
  • If the input is a raw JSON string, it is automatically parsed — no need for a separate JSON Parse node.
  • Port types are detected automatically: numbers become float or int, text becomes string, true/false becomes bool, and nested structures become json.

A ready-made example project for this node is built into Grafit Pro: select the node in the library and open or drag the example from its description panel.

Open JSON Break in the interactive catalog →

JSON Break is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More JSON nodes