JSON

Description

The following OverNode are used to manage JSON data.

Note: To read the JSONNode value you must convert it into a string using the node ToString.

Has Key

Open Url node

The "Has Key" node checks if a specified key exists within a JSON object. It takes a JSONNode and a string key as inputs and returns a boolean result. This node is particularly useful in parsing JSON data, allowing the user to verify the presence of data before attempting to access it, thus avoiding potential errors in the data handling process.

Name
Type
Description

JSON

JSONNode

An input slot for the JSON object in which the presence of the key will be checked.

Key

string

An input slot for the key to be checked within the JSON object.

Result

bool

An output slot that provides the result of the check; true if the key exists, otherwise false.

Get JSON Value

Web request node

The "Get JSON Value" node is designed to retrieve a value from a JSON object using a specified key. It accepts a JSONNode and a key as inputs and outputs the corresponding value as a JSONNode. If the key does not exist within the JSON object, a warning is logged, and the node outputs null. This node is essential for extracting specific pieces of data from JSON structures, particularly when handling responses from web services or parsing JSON data files.

Name
Type
Description

JSON

JSONNode

An input slot that receives the JSON object from which the value will be extracted.

Key

string

An input slot for the key corresponding to the value to be retrieved from the JSON object.

Result

JSONNode

An output slot that provides the value associated with the input key from the JSON object, or null if the key is not present.

Set JSON Entry

Form Field node

The "Set JSON Entry" node is used to modify or add a new key-value pair to a JSON object. It accepts a JSONNode, a key, and a value as inputs. The node updates the JSON object with the new value for the specified key or adds the key-value pair if the key does not exist. The result is an updated JSON object. This operation is fundamental when manipulating JSON structures, such as configuring settings, updating data, or preparing payloads for web requests.

Name
Type
Description

JSON

JSONNode

An input slot for the JSON object to be modified or added to.

Key

string

An input slot for the key of the JSON entry to set or update.

Value

string

An input slot for the value to be associated with the specified key in the JSON object.

Updated JSON

JSONNode

An output slot that provides the JSON object after the key-value pair has been set or updated.