JSON String Parser (10X) (Soze)
Ten values out of a JSON document — keys in, strings out
- value_1
- value_2
- value_3
- value_4
- value_5
- value_6
- value_7
- value_8
- value_9
- value_10
Somewhere in your workflow there's a JSON document - an API response, a config file, a CSV row that was JSON-stringified - and you need a handful of its fields as plain strings to feed the rest of the graph. JSON String Parser (10X) (Soze) is the cheap way to do it: paste/feed one JSON string in, type up to ten key paths, get ten string outputs. A missing key doesn't kill the run; that slot just comes back empty.
It's the read-side sibling of the Soze JSON builder family. The builder nodes construct JSON; this one dismantles it. Where the full-blown JSON Path Extractor node has fancier conventions and error modes, this node deliberately keeps it simple: 10 named key widgets, 10 named string outputs, no word limits, no defaults to trip over. "A missing or invalid key just yields an empty string for that slot and the node keeps going," as the source puts it.
How it works
Each key_N widget accepts one of three forms:
- a bare top-level name -
Story - a dotted path -
Story.Name - indexed access -
items[0].idor0.title
On execution it parses the JSON (loosely - it'll take slightly-malformed input where it can) and walks each key path. Primitives are stringified as-is, objects and arrays are pretty-printed back to JSON, and null becomes an empty string. It counts hits and reports OK: extracted 7/10 key(s) in the status.
Inputs and outputs
- json_string - required, the JSON document (multiline).
- key_1 … key_10 - required string widgets; type the paths you want. Leave blank to skip that slot.
Outputs: value_1 … value_10, all STRING. Wire them into prompt builders, filename nodes, CSV writers - anywhere text goes.
json_string = {"name":"Alice","meta":{"age":30},"tags":["a","b"]}
key_1 = "name" → value_1 = "Alice"
key_2 = "meta.age" → value_2 = "30"
key_3 = "tags[0]" → value_3 = "a"
Installing it
Part of the Soze pack:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
Restart ComfyUI, or search ComfyUI_Soze in ComfyUI Manager.
Gotchas
Everything out of this node is a string, even numbers - 30, not 30. That's fine for text slots, but if the downstream node genuinely needs an INT or FLOAT, run the value through a converter. Also note it re-executes every run (IS_CHANGED always returns changed), so don't be surprised if it shows as dirty even when nothing changed - that's deliberate, so edited files always get re-parsed. And if you have deeply nested or wildcard-heavy extraction needs, the JSON Path Extractor node in the same pack is the heavier-duty alternative.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| json_string | STRING | — | |
| key_1 | STRING | — | |
| key_2 | STRING | — | |
| key_3 | STRING | — | |
| key_4 | STRING | — | |
| key_5 | STRING | — | |
| key_6 | STRING | — | |
| key_7 | STRING | — | |
| key_8 | STRING | — | |
| key_9 | STRING | — | |
| key_10 | STRING | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| value_1 | STRING | — |
| value_2 | STRING | — |
| value_3 | STRING | — |
| value_4 | STRING | — |
| value_5 | STRING | — |
| value_6 | STRING | — |
| value_7 | STRING | — |
| value_8 | STRING | — |
| value_9 | STRING | — |
| value_10 | STRING | — |