JSON OutputList
Pull values out of any JSON with JSONPath — including your own workflow metadata
- obj
- key
- value
- int
- float
- count
- debug
JSON OutputList is the pack's Swiss-army knife for anything structured: API responses, config files, workflow metadata, even literal arrays you want to sweep. It extracts values from a JSON object with a JSONPath query and flattens every match into one output list, so downstream nodes run once per extracted value.
It's built on jsonpath_ng, the standard Python JSONPath library, so the query syntax is the familiar $.dict, $.arr[*], $..value style. The mechanism is worth knowing: each match gets flattened into a single long list. A matched object's keys become entries, a matched array's elements become entries, scalars become a single entry - all merged in order, and the count output tells you how many you ended up with.
The inputs
- jsonpath - the query, e.g.
$.dict. Default$.dictcomes pre-filled. - json - a JSON string (multiline box). A default sample object ships with it.
- obj - optional wildcard input that replaces the JSON string entirely. This is the sneaky-powerful one: feed it any node's object output and query that instead of a pasted string.
Outputs are key (dictionary keys or array indices, as strings), value (the values as strings), int and float (parsed numbers, defaulting to 0 when unparseable), count, and debug - a pretty-printed JSON of every matched object, invaluable when a query returns nothing and you need to see why.
The use case that justifies it
The pack's flagship pattern: Load Any File.metadata → JSON OutputList with jsonpath=$.["PNG:Prompt"]. ComfyUI embeds the full workflow JSON in every PNG it saves, so you can load a batch of saved images, extract each one's prompt, and re-run or iterate them. That's how the Workflow Discriminator node recovers the exact prompt behind each image in a grid. You can also use it standalone with literal strings: [1, 2, 3] as json with jsonpath=$ gives you an instant number list when Number OutputList's ranges don't fit.
Installing
Search "OutputLists Combiner" in ComfyUI Manager, or clone into ComfyUI/custom_nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/ComfyUI-outputlists-combiner
cd ComfyUI-outputlists-combiner
uv pip install -r requirements.txt
Restart after. jsonpath_ng is one of the lighter deps in the pack's requirements - no models, no binaries. If a JSONPath returns empty, check debug first: a malformed path silently yields zero matches, and debug showing [] tells you it's the query, not the data.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| jsonpath | STRING | $.dict | JSONPath used to extract the values. |
| json | STRING | { "dict": { "a": 0.12, "b": 3.45, "c": 6.78 }, "arr": [ 0.12, 3.45, 6.78 ] } | A JSON string which is translated to an object. |
| objopt | * | (optional) object of any type which will replace the JSON string |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| key | STRING | The key for dictionaries or index for arrays (as string). use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes. Technically it's a global index of the flattened list for all non-keys. |
| value | STRING | The value as a string. use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes. |
| int | INT | The value as a int (if it cannot parse the number, defaults to 0). use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes. |
| float | FLOAT | The value as a float (if it cannot parse the number, defaults to 0). use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes. |
| count | INT | Total number of items in the flattened list |
| debug | STRING | Debug output of all matched objects as a formatted JSON string |