JSON List Zip (PixNodes)
Zip several lists into one list of objects, index by index
- json_list
Python's zip() takes several lists and pairs them up by index: first-with-first, second-with-second. JSON List Zip is that, as a ComfyUI node, producing a list of objects where each object is one row assembled from the parallel columns you fed in. It's the table-builder of the pack's JSON toolset.
You configure it by typing column names into merge_keys, one per line - prompt, image_path, duration - and each line becomes an input port expecting a list. Feed it three equal-length lists and the output is a list of dicts: row 0 gets element 0 of every list, row 1 gets element 1, and so on. That's the whole point: take columns, get rows.
The details that make it useful
The node is lenient about what you give it. A list works, obviously, but a single dict gets wrapped into a one-item list, and a JSON string gets parsed (with a light syntax-repair pass for single quotes and None literals). So you can zip together a JSON array from one node and a raw string from another without a bunch of prep.
Two behaviors are worth knowing before you rely on them:
- Broadcasting. Prefix a column name with
@(e.g.@style) and instead of a per-row value, the first value of that list is copied into every row. Great for tagging the whole batch with a shared property. - Uneven lengths. The row count is set by the longest normal (non-broadcast) list; shorter lists get
Nonefor the missing rows. That's a feature if you're zipping data with different coverage, a footgun if you expected an error.
Output is json_list (JSON) - a Python list of dicts on a JSON port, per this pack's post-1.0.8 convention. Objects that are dicts get spread into the row rather than nested, which keeps the rows flat.
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 snippet pastes the wrong repo URL, ComfyUI-AlignLayout - use the one above.) No models, no extra deps.
When you'd reach for it
This is the inverse of JSON List Pluck - Pluck turns rows into columns, Zip turns columns into rows. If you've been plucking per-field lists out of a storyboard blob, editing them, and want to reassemble a modified list of objects, this is the reassembly tool. It's also the clean way to build a parameter table for batch processing: three lists of prompts, sizes, and seeds become one list of parameter objects you can iterate.
One honest caveat: if your lists have very different lengths, the silent None padding can smuggle missing data into rows that look fine at a glance. Check the row count against what you expect, or keep your inputs aligned.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| merge_keys | STRING | key | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| json_list | JSON | — |