ComfyUI Node: JSON OutputList

Class Name

JSONOutputList

Category
Utility
Author
geroldmeisinger (Account age: 1214days)
Extension
ComfyUI-outputlists-combiner
Latest Updated
2025-12-23
Github Stars
0.06K

How to Install ComfyUI-outputlists-combiner

Install this extension via the ComfyUI Manager by searching for ComfyUI-outputlists-combiner
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-outputlists-combiner in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

JSON OutputList Description

The JSONOutputList node extracts and compiles JSON data using JSONPath, simplifying data handling.

JSON OutputList:

The JSONOutputList node is a versatile utility designed to extract and compile data from JSON objects using JSONPath syntax. This node is particularly useful for AI artists who need to manipulate and analyze JSON data without delving into complex programming. By leveraging JSONPath, a query language for JSON, you can easily extract arrays or dictionaries from JSON objects and flatten them into a single list. This node also allows you to create objects from literal strings, such as [1, 2, 3], making it a powerful tool for data transformation and analysis. The JSONOutputList node simplifies the process of handling JSON data, enabling you to focus on creative tasks while ensuring data is organized and accessible.

JSON OutputList Input Parameters:

jsonpath

The jsonpath parameter specifies the JSONPath expression used to extract values from the JSON data. It determines which parts of the JSON object will be selected and processed. The default value is $.dict, which targets a dictionary within the JSON structure. This parameter is crucial for directing the node to the correct data within the JSON object, and understanding JSONPath syntax is essential for effective use.

json

The json parameter is a JSON string that will be parsed into an object. It serves as the primary data source for the node. The default value is a formatted JSON string containing a dictionary and an array: { "dict" : { "a": 0.12, "b": 3.45, "c": 6.78 }, "arr": [0.12, 3.45, 6.78] }. This parameter can be multiline and acts as a placeholder for the JSON data you wish to process. It is important to ensure that the JSON string is correctly formatted to avoid parsing errors.

obj

The obj parameter is an optional input that allows you to provide an object of any type to replace the JSON string. If specified, this object will be used instead of the JSON string for data extraction. This flexibility is useful when you have pre-processed data or when working with non-JSON data structures. If not provided, the node defaults to using the json parameter.

JSON OutputList Output Parameters:

key

The key output provides the keys for dictionaries or indices for arrays as strings. It represents a global index of the flattened list for all non-key elements. This output is essential for identifying the position or name of each extracted element within the original JSON structure.

value

The value output returns the extracted values as strings. This output is crucial for accessing the actual data extracted from the JSON object, allowing you to use or manipulate these values in subsequent processes.

int

The int output converts the extracted values into integers. If a value is not a parseable number, it defaults to 0. This output is useful for numerical operations where integer values are required, providing a straightforward way to handle numeric data.

float

The float output converts the extracted values into floating-point numbers. Similar to the int output, non-parseable numbers default to 0. This output is important for precision-based calculations and operations involving decimal numbers.

count

The count output indicates the total number of items in the flattened list. It provides a quick overview of the number of elements extracted and processed, which can be useful for validation and analysis purposes.

debug

The debug output offers a formatted JSON string of all matched objects, serving as a debug tool. This output is valuable for verifying the correctness of the JSONPath expression and understanding the structure of the extracted data.

JSON OutputList Usage Tips:

  • Familiarize yourself with JSONPath syntax to effectively extract the desired data from complex JSON structures.
  • Use the obj parameter to directly input pre-processed data or non-JSON objects, providing flexibility in data handling.
  • Utilize the debug output to verify the accuracy of your JSONPath queries and ensure the correct data is being extracted.

JSON OutputList Common Errors and Solutions:

Invalid JSONPath Expression

  • Explanation: The JSONPath expression provided is not valid or does not match any data in the JSON object.
  • Solution: Double-check the JSONPath syntax and ensure it correctly targets the desired data within the JSON structure.

JSON Parsing Error

  • Explanation: The JSON string is not properly formatted, leading to a parsing error.
  • Solution: Validate the JSON string format, ensuring all brackets, commas, and quotes are correctly placed.

Non-Parseable Number

  • Explanation: A value extracted cannot be converted to an integer or float, defaulting to 0.
  • Solution: Ensure that the data being extracted is numeric if you intend to use the int or float outputs.

JSON OutputList Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-outputlists-combiner
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.