ComfyUI > Nodes > ComfyUI-LLMs-Toolkit > JSON Extractor

ComfyUI Node: JSON Extractor

Class Name

JSONExtractor

Category
🚦ComfyUI_LLMs_Toolkit/JSON
Author
HuangYuChuh (Account age: 42days)
Extension
ComfyUI-LLMs-Toolkit
Latest Updated
2026-04-23
Github Stars
0.02K

How to Install ComfyUI-LLMs-Toolkit

Install this extension via the ComfyUI Manager by searching for ComfyUI-LLMs-Toolkit
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-LLMs-Toolkit 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 Extractor Description

Extract specific JSON values using designated key for AI artists and developers, preserving native types for downstream use.

JSON Extractor:

The JSONExtractor node is designed to facilitate the extraction of specific values from a JSON string using a designated key. This node is particularly useful for AI artists and developers who need to parse JSON data and retrieve specific information without delving into complex coding. By allowing you to specify a key, including nested keys, the JSONExtractor efficiently navigates through the JSON structure to find and return the desired value. This capability is essential for workflows that involve processing JSON data, enabling you to seamlessly integrate and utilize JSON-derived information in your projects. The node ensures that the extracted values are preserved in their native types, making them readily usable for downstream processes.

JSON Extractor Input Parameters:

json_string

The json_string parameter is a required input that expects a JSON-formatted string. This string serves as the source from which the node will extract the desired value. It is crucial that the input is a valid JSON string, as any deviation from the JSON format will result in an error. This parameter does not have a default value, and you must provide a valid JSON string for the node to function correctly.

key

The key parameter is a required input that specifies the key whose value you wish to extract from the JSON string. This key can be a simple key or a nested key, using dot notation (e.g., user.profile.name) to access values within nested JSON objects. The default value for this parameter is an empty string, and you should provide a valid key to ensure successful extraction of the desired value.

JSON Extractor Output Parameters:

value

The value output parameter represents the extracted value from the JSON string based on the specified key. This output can be of any JSON-compatible type, such as a string, number, boolean, null, object, or array. The node ensures that the extracted value is preserved in its native type, allowing for seamless integration with other nodes or processes that may require specific data types.

JSON Extractor Usage Tips:

  • Ensure that the json_string input is a valid JSON format to avoid errors during extraction.
  • Use dot notation in the key parameter to access nested values within the JSON structure, which can be particularly useful for complex JSON data.

JSON Extractor Common Errors and Solutions:

Invalid JSON: <error_message>

  • Explanation: This error occurs when the provided json_string is not in a valid JSON format, preventing the node from parsing it.
  • Solution: Verify that the json_string is correctly formatted as JSON. Use online JSON validators to check and correct any formatting issues.

Key '<key>' not found

  • Explanation: This error indicates that the specified key does not exist within the JSON structure, making it impossible to extract a value.
  • Solution: Double-check the key for typos or incorrect paths. Ensure that the key matches the structure of the JSON data, especially when using nested keys.

Cannot access key '<key>' on non-dict value

  • Explanation: This error arises when attempting to access a key on a value that is not a dictionary, which is necessary for key-based access.
  • Solution: Review the JSON structure to ensure that the path specified by the key leads to a dictionary object. Adjust the key path as needed to align with the JSON hierarchy.

JSON Extractor Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LLMs-Toolkit
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.

JSON Extractor