Get Float From JSON
Pull one numeric value out of a JSON blob
- json
- FLOAT
Part of the pack's Get<*>FromJson family - GetTextFromJson, GetBoolFromJson, GetIntFromJson, GetObjectFromJson - each pulling one specific type of value out of a JSON object by key. This one is for numbers: a CFG value suggested by an LLM node, a strength field in an API payload, a numeric setting loaded from a config URL. Grab it here as a FLOAT and it's ready to drive any continuous parameter downstream.
How it works
It walks into the json value using your key path and returns whatever numeric value it finds there as a FLOAT. The pack's path syntax handles nested objects and arrays: key.[index].subkey.[sub_index] - so params.[0].strength reaches into the first element of a params array and pulls its strength field. Like GetBoolFromJson, this node is flagged as an output node, so it can terminate a branch and surface its value directly in the UI when you run the graph - useful for eyeballing what a JSON field actually resolved to without a separate debug node.
The inputs and outputs that matter
Two required inputs:
json- the parsed JSON value to read, wired fromLoadJsonFromUrl,LoadJsonFromText, an LLM node's structured output, or anotherGet*FromJsonnode.key- the path to the number you want, as a string. Top-level fields are just the key name; nested ones use the dotted/bracketed path form.
One output: FLOAT - plug it straight into any numeric input that takes a float, like CFG, denoise, or a LoRA strength.
How to install it
Comes with the Art Venture pack. ComfyUI Manager: search comfyui-art-venture, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/sipherxyz/comfyui-art-venture
Restart ComfyUI. No downloads - pure Python, loads instantly.
Common issues & troubleshooting
Returns 0 or errors instead of the real value. Nearly always a key path that doesn't match the actual JSON shape. Check the raw data first - enable print_to_console on whichever loader fed this - and confirm the exact key names and array positions before trusting the path.
Need it feeding an INT-only socket (like steps or seed). This node only outputs FLOAT. If the downstream input wants a whole number, route the value through StringToNumber or a similar conversion node afterward rather than expecting GetFloatFromJson to give you both types the way StringToNumber does.
Value is in the wrong range for the parameter it's feeding. This node hands back exactly what was in the JSON, no scaling. If a JSON field ranges 0–100 and you need it as a 0–1 denoise value, pass it through NumberScaler to remap the range before wiring it into the sampler.
Nested path won't resolve. Same rules as the rest of the JSON family: bracket the array indices ([0]), dot-separate every nesting level, and consider GetObjectFromJson to drill down one step at a time if a long path keeps failing silently.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| json | JSON | — | |
| key | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |