JSON Extract (Multiple)
Fan one LLM JSON object into N named STRING sockets
- value_1
- value_2
- value_3
- value_4
- value_5
- value_6
- value_7
- value_8
- value_9
- value_10
Here's the workflow that makes people keep this pack installed: you set the schema widget on Fal Text-to-Text to flux_ref_prompt, motion_prompt, title, description, tags, run one Claude call, and get back a JSON object with all five fields. JSON Extract (Multiple) is the fan-out node that turns that object into five individual STRING outputs - each socket renamed after the key you typed, so you wire title straight into your filename node and never look at raw JSON.
It's the same idea as the single-key extractor, but with the pack's signature counter UX: instead of dropping one node per field, you dial up how many fields you want and type a key into each row.
Inputs and outputs
- json_string - the JSON text, wired in (it's
forceInput). Works with any upstream JSON STRING, not just this pack's LLM nodes. - key_count - an INT with +/- arrows, 1 to 10. Bump it to add rows, drop it to remove them.
- default - one shared fallback for any key that's missing or any input that doesn't parse.
- key_1 .. key_10 - one text row per active count. Type
titleinto key_1 and the first output socket renames itself totitle.
Outputs: value_1 .. value_10, one STRING per row. The visible outputs track key_count, so a three-key node shows three sockets, not ten.
How it works
The frontend extension watches key_count and shows or hides rows and output sockets - the same trick the pack's Reference-to-Video and Reference-to-Image nodes use for image inputs. The backend always returns the full set of outputs padded with the default value, and the extension trims the visible ones. Missing key, unparseable JSON, or a key you didn't type → default. Nested objects come back serialized as JSON, primitives stringified. It never hard-crashes the graph, which is more than you can say for a lot of JSON plumbing.
When you'd reach for it
Any time an LLM returns a structured object and you want its fields as named sockets without copy-pasting extractor nodes. One Claude call → five outputs feeding a video prompt, a title, and a tag list is the canonical move. The single-key variant still wins when keys come from different upstream sources or you want a per-field default - this node's default is shared across all rows.
Install
Ships with ComfyUI-Fal-Gateway:
cd ComfyUI/custom_nodes
git clone https://github.com/modbender/ComfyUI-Fal-Gateway
pip install -r requirements.txt
Pure local string parsing - no API key needed here, though the LLM nodes upstream of it want one. Restart ComfyUI and it's under Fal-Gateway.
Gotchas
- Set the
default. Models don't always honorresponse_format- a smaller model can return prose instead of JSON, and then every output comes back as yourdefault. Empty default → empty sockets → confusing graph. - Hand-editing
key_countpast the declared range gets clamped back to 1–10, and blank rows return the default. Not something you'll hit from the UI, but it means the node won't explode on a stale workflow.
If you've ever built a "parse the LLM output with three extractor nodes and a regex" monster, this is the tidy replacement: one node, typed sockets, done.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| json_string | STRING | — | |
| key_count | INT | 11–10 | — |
| default | STRING | — | |
| key_1 | STRING | — | |
| key_2opt | STRING | — | |
| key_3opt | STRING | — | |
| key_4opt | STRING | — | |
| key_5opt | STRING | — | |
| key_6opt | STRING | — | |
| key_7opt | STRING | — | |
| key_8opt | STRING | — | |
| key_9opt | STRING | — | |
| key_10opt | 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 | — |