Nodes/Quality of Life Nodes for ComfyUI/JSON Chain String Pairs (10X) (Soze)
ComfyUI Node

JSON Chain String Pairs (10X) (Soze)

Ten string pairs in one node — when you just want to type keys

By SozeInc·Created 2 years ago·Updated 8 days ago· 10
JSON Chain String Pairs (10X) (Soze)
  • chain_in
  • chain_out
name_1
value_1
name_2
value_2
name_3
value_3
name_4
value_4
name_5
value_5
name_6
value_6
name_7
value_7
name_8
value_8
name_9
value_9
name_10
value_10

The single JSON Chain String Pair forces you to wire a value in - great for dynamic payloads, annoying when you just want to hardcode a dozen static keys into an object. JSON Chain String Pairs (10X) (Soze) is the opposite workflow: ten name_N / value_N pairs, all plain text widgets, all typed directly on the node. It exists to keep the widget surface manageable when a long chain of single-pair nodes would clutter your graph.

This is the "authoring" node of the Soze JSON family. If you're building a static config block, a fixed set of metadata fields, or a template payload where most keys never change, this is what you reach for. It outputs a normal JSON_PAIRS chain, so it plugs into everything else the family does.

How it works

Both the names and values are STRING widgets - no forceInput, so you type them straight in. On execution it walks all ten rows and appends every pair whose name_N is non-blank; half-filled nodes are fine, blank rows are just skipped. One subtlety: because values are strings, everything lands in the JSON as a string. If you need "count": 3 as a real number, use the typed pair nodes (Int/Float/Bool Pair) instead of this one.

The source documents two patterns worth stealing:

  • Siblings - feed chain_out into the next pair node's chain_in, or straight into JSON Generate. Your ten keys land at the same nesting level as whatever's already in the chain.
  • Sub-values - feed chain_out into a JSON Object Pair's nested_chain instead. The Object Pair wraps all ten pairs under one named property - the fast way to build a meta: { … } block with ten keys in it.

Inputs and outputs

  • name_1 … name_10 - required string widgets, the keys.
  • value_1 … value_10 - required string widgets, the values.
  • chain_in - optional JSON_PAIRS; append these pairs to an existing chain, or leave empty.

Output: chain_out.

String Pairs (10X) → JSON Generate

with name_1="title", value_1="My Image"{"title":"My Image"}.

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

Remember the "everything is a string" caveat - this node is a shortcut for static string data, not a replacement for the typed pairs. If you mix this node's output with typed pairs in one chain, both work fine together (the chain is just tuples), so the pragmatic split is: numbers and booleans through typed nodes, the rest through the 10X. And if you leave a name_N blank, the whole row is ignored, which is the feature that makes "just fill in what you need" painless.

CategorySoze Nodes/JSON

Inputs (21)

NameTypeDefaultDescription
name_1STRING
value_1STRING
name_2STRING
value_2STRING
name_3STRING
value_3STRING
name_4STRING
value_4STRING
name_5STRING
value_5STRING
name_6STRING
value_6STRING
name_7STRING
value_7STRING
name_8STRING
value_8STRING
name_9STRING
value_9STRING
name_10STRING
value_10STRING
chain_inoptJSON_PAIRS

Outputs (1)

NameTypeDescription
chain_outJSON_PAIRS