JSON Object Combine (PixNodes)
Assemble one JSON object with named ports you control
- json_object
Join JSON Object gives you ports called AnyData_1. JSON Object Combine is the version that lets you name the ports, which makes the output object actually readable. You type the keys you want into merge_keys - one per line - and each line becomes an input port on the node. Wire a value into the width port and the result object has a width field. That's the whole trick, and it's the difference between a mystery dictionary and a parameter object you can trust.
How the merge decides what lands where
The behavior splits cleanly on the type of each input, and it's worth internalizing because it's the node's personality:
- Dict input (or a JSON object string) → spread. Its keys get flattened into the result at the top level, ignoring the port name. So a port called
metafed a{"style": "film", "fps": 24}object contributesstyleandfpsdirectly. - Anything else - a string, number, list - is stored under the port's name as-is. Port
seedfed1234gives you"seed": 1234.
The empty-input behavior is controlled by skip_unconnected (default on): with it on, unconnected ports simply don't appear in the output; flip it off and they come through as empty strings. If you're building a config object that must always have every field, turn it off - but for most assembly work you want it on so dangling ports don't pollute the result.
The inputs
merge_keys(multiline string, defaultparam1\nparam2) - your key list; each line is a port name. Rename them to what your data actually is.skip_unconnected(boolean) - drop empty ports or keep them.
Output: json_object (JSON) - a Python dict on a JSON port, per the pack's post-1.0.8 convention (no string output anymore). If you need formatted text, route it through JSON Unpacker.
Install
Part of Comfyui-PixNodes. ComfyUI Manager → search "PixNodes" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/pixixai/Comfyui-PixNodes
then restart. (The README's manual-install line pastes the wrong repo URL, ComfyUI-AlignLayout - use the one above.) No models, no extra deps.
When it beats the alternatives
Use this over Join JSON Object whenever the key names matter - which is most of the time, honestly, because the port-name-as-key behavior of the quick version produces fields called AnyData_3 that you'll be renaming later anyway. It's the right tool for assembling API payloads, parameter objects for batch loops, or any structured config where "what is this field called" is not a trivia question. The one thing to watch: a dict fed into a port spreads its keys, so a collision between two spread objects is resolved by port order - later wins, silently.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| merge_keys | STRING | param1 param2 | — |
| skip_unconnected | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| json_object | JSON | — |