> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# JsonExtractString - ComfyUI Built-in Node Documentation

> Complete documentation for the JsonExtractString node in ComfyUI. Learn its inputs, outputs, parameters and usage.

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/JsonExtractString/en.md)

The JsonExtractString node reads a text string containing JSON data and extracts the value associated with a specific key. It converts the extracted value into a string. If the JSON is invalid, the key is not found, or the value is null, the node returns an empty string.

## Inputs

| Parameter     | Data Type | Required | Range | Description                                                                                                        |
| ------------- | --------- | -------- | ----- | ------------------------------------------------------------------------------------------------------------------ |
| `json_string` | STRING    | Yes      | N/A   | The text containing the JSON data to be parsed. This field supports multiline input.                               |
| `key`         | STRING    | Yes      | N/A   | The specific key whose value you want to extract from the JSON object. This field supports single-line input only. |

**Note:** The node only extracts values from JSON objects (dictionaries). If the parsed JSON is not an object or if the specified key does not exist within it, the output will be an empty string. If the value associated with the key is `null`, the node also returns an empty string.

## Outputs

| Output Name | Data Type | Description                                                                                                 |
| ----------- | --------- | ----------------------------------------------------------------------------------------------------------- |
| `output`    | STRING    | The string value extracted from the JSON for the specified key, or an empty string if the extraction fails. |

***

**Source fingerprint (SHA-256):** `ef99b7d2aa82dd290624edaf03f509ade91438639e056b4cb67057b0881b9dc3`
