Nodes/Comfyui-PixNodes/Create JSON List (PixNodes)
ComfyUI Node

Create JSON List (PixNodes)

Build a JSON array with a real editor

By pixixai·Created 8 months ago·Updated 6 months ago· 24
Create JSON List (PixNodes)
    • json_list
    json_data[]

    Once you put an LLM in your workflow, you discover that everything worth doing with it involves structured data - lists of prompts, lists of seeds, lists of config values - and that typing JSON into a multiline string widget is a miserable way to maintain that. Pix_CreateJsonList gives you a proper list editor: add entries, each with a value and a type, and it hands you a real JSON array out the other side.

    The single input is json_data, a STRING widget (default []) that the node's custom frontend uses to store the editor state - you never edit it directly, you edit the visual list UI. The output is json_list, typed JSON, which is the actual Python list object, ready to feed any node in the PixNodes JSON family or anything else that accepts a JSON type. A version of this node used to also emit a serialized string; the 1.0.8 changelog removed the string output, so don't go looking for it - you get the object, and if you need text, run it through a JSON-stringify node downstream.

    The editor is the point. Instead of hand-writing ["foo", "bar", "baz"] and hoping the commas are right, you add rows, pick each entry's type (string, number, boolean - whatever the editor exposes), and reorder them visually. The backend converts those entries into a clean Python list. That's the same Notion-style key/value editor philosophy as its sibling Pix_CreateJsonObject, but for arrays.

    This is the node you reach for when a workflow parameterizes data: a list of prompts you'll loop over with the PixNodes loop pair, a list of image filenames you'll iterate, a config array you'll hand to a JSON List processing node. Because the output is a real list object rather than a string, it composes cleanly with the rest of the pack's JSON machinery instead of making every downstream node re-parse text.

    Install is the standard PixNodes path - ComfyUI Manager, search PixNodes, restart - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pixixai/Comfyui-PixNodes
    cd Comfyui-PixNodes
    pip install -r requirements.txt
    

    then restart. Dependencies are just openai and Requests; nothing heavy, no models.

    The honest caveat: if your data comes from somewhere programmatic - an LLM returning JSON, a CSV, a folder scan - this node is the wrong tool; you want a node that parses that input, not a hand-maintained editor. But for the workflow you build once and tune by hand - the standing parameter list you edit between runs - this is exactly right, and it's the reason to keep the PixNodes JSON family installed. Pair it with Pix_CreateJsonObject when some of your parameters are keyed and some are positional.

    CategoryPixNodes/JSON

    Inputs (1)

    NameTypeDefaultDescription
    json_dataSTRING[]

    Outputs (1)

    NameTypeDescription
    json_listJSON