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

# Write JSON

### **Overview:**

The `Write JSON` block enables users to efficiently add or update key-value pairs within a JSON object. This block eliminates the need for manual interventions or custom coding, making it particularly useful for automation and data management.

***

### Inputs & Outputs

| I/O    | Feature        | Type   | Simple Explanation                                                                                                                    |
| ------ | -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| input  | `key`          | string | A list of comma-separated keys that specify which keys in the JSON object will have their values added or updated.                    |
| input  | `json`         | object | The original JSON data designated for updating. If this is absent, a new JSON object will be created instead.                         |
| input  | `json_value`   | string | A list of comma-separated values to be added or updated in conjunction with the specified keys; can represent new or existing values. |
| output | `updated_json` | object | The modified version of the original JSON that reflects all changes made by updating or adding values for the specified keys.         |

***

### Use Cases

Consider how this block can streamline various processes:

* **Updating Configuration Settings:** When managing application settings, use this block to effortlessly inject new parameters into your configuration without manually editing files.
* **Modifying API Response Data:** If you're working with responses from external APIs, apply this block to ensure that your data remains current by updating key information right away.
* **Dynamic Updating of JSON Content:** In automated workflows where you frequently modify data structures, use this tool to maintain up-to-date records without extensive coding efforts.

In summary, whenever there's a need to adjust key-value pairs within a JSON structure, the `Write JSON` block provides an effective solution!
