JSON Path Extractor (Soze)
Pull up to 10 values out of one blob
- parsed_data1
- parsed_data2
- parsed_data3
- parsed_data4
- parsed_data5
- parsed_data6
- parsed_data7
- parsed_data8
- parsed_data9
- parsed_data10
You've got one JSON blob - an API response, a metadata sidecar, a config object - and you need five or six different fields out of it scattered across your graph. The obvious approach is chaining five or six single-value extractor nodes, each re-parsing the same string. JSON Path Extractor does it in one node instead: hand it a JSON string once, list up to ten paths, and get ten values back in parallel.
How it works
You paste your JSON into json_string, then fill in however many of the ten path fields you actually need (leave the rest blank). Each path is evaluated against the same parsed JSON and its corresponding parsed_data output gets the result. Because the parsing happens once and gets reused across all ten lookups, this is both less wiring and less redundant work than daisy-chaining separate extractors - genuinely useful once you're past the point of pulling just one or two fields.
The node doesn't document its path syntax in the schema, so if you're not sure whether it wants dot notation (data.user.name), bracket notation, or something JSONPath-flavored ($.data.user.name), the fastest way to find out is trying dot notation first on a simple test blob - it's the most common convention for this kind of lightweight extractor - and checking the output.
The inputs and outputs that matter
json_string- required, multiline. The JSON blob you're extracting from.path1throughpath10- ten independent path fields, each default empty. You don't have to fill all ten; leave the ones you're not using blank.- Outputs:
parsed_data1throughparsed_data10- one output per path, in matching order. Wire only the ones you need downstream.
How to install it
Through ComfyUI Manager (search "Quality of Life Nodes for ComfyUI" or "Soze") or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
then restart. No models or heavy dependencies involved, and none of the pack's optional API keys apply to a pure JSON utility node.
Common issues & troubleshooting
A path returns empty and you're sure the field exists. Path syntax that isn't documented is the first thing to double-check - try the simplest possible dot-notation path on a minimal test JSON object before assuming the field itself is the problem.
The node throws instead of returning blanks for missing paths. If your JSON is inconsistent (some entries have a field, others don't) and you're driving this from something like a folder loop, that inconsistency is more likely your source data than this node - validate the JSON going in with JSON Formatter first if you're not sure it's well-formed.
You only need one or two fields. It's completely fine to use this node for a single path and ignore the other nine - there's no penalty for leaving fields blank, and it still beats writing a single-purpose extractor for one value if you expect to add more paths later.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| json_string | STRING | — | |
| path1 | STRING | — | |
| path2 | STRING | — | |
| path3 | STRING | — | |
| path4 | STRING | — | |
| path5 | STRING | — | |
| path6 | STRING | — | |
| path7 | STRING | — | |
| path8 | STRING | — | |
| path9 | STRING | — | |
| path10 | STRING | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| parsed_data1 | STRING | — |
| parsed_data2 | STRING | — |
| parsed_data3 | STRING | — |
| parsed_data4 | STRING | — |
| parsed_data5 | STRING | — |
| parsed_data6 | STRING | — |
| parsed_data7 | STRING | — |
| parsed_data8 | STRING | — |
| parsed_data9 | STRING | — |
| parsed_data10 | STRING | — |