JSON PURE

JSON PURE

Try Get Json Length

Try Get Json Length

Overview

Attempts to determine the number of key-value pairs inside a given JSON object. This is a pure function that inspects the structure and returns how many fields are present at the top level of the object. Commonly used when iterating through dynamic or unknown JSON data lengths and a length is required.

Note: This node does not copy the entire structure forward. It only returns the newly created nested object so you can build into it directly.

Inputs

  • JSON Object – The JSON object whose length (number of fields) you want to retrieve.

Outputs

  • Length – An integer representing the number of fields (keys) in the provided JSON object.


Try Get Json Value

Set Json Object Field

Overview

This node is a universal “Try Get” function that combines the functionality of all individual JSON “Try Get” nodes into one pure function. It dynamically determines the type of value to retrieve based on the variable type connected to the Out Data output pin. This allows developers to fetch Booleans, strings, numbers, objects and more using one flexible node.

Note: The wildcard pin must be set before execution. The node will search for the field based on the data type connected to Out Data.

Inputs

  • JSON Object – The JSON object to search within.

  • Field Name - The name of the field (as a string) to retrieve.

Outputs

  • Out Data (Wildcard) – The resulting value found from the JSON object.


Try Get First Json Field Value

Try Get First Json Field Value

Overview

This node retrieves the value of the first field found in a JSON object. The type of the value to be retrieved is determined by the variable connected to the Out Data pin (Wildcard). This is useful when you want to inspect or access the first entry of a JSON structure.

Inputs

  • JSON Object – The JSON object from which the first value will be retrieved.

Outputs

  • Out Data – The value of the first found field.


New Json Object From String

New Json Object From String

Overview

This node creates a local JSON object from a string without needing a execution pin. It is a pure function and is often used when working with inline JSON or when importing data from a string format. The provided string must be valid JSON syntax.

Note: If you want to quickly debug JSON data or dynamically parse a string into a JSON object, this is a useful node. However, since it is a pure function, the resulting data exists only for the current frame. Be sure to store or process the output immediately, as the data will be lost on the next engine frame.

Inputs

  • In Json String – A text string containing valid JSON data to be parsed.

Outputs

  • Out Value – A JSON object generated from the input string. If the string is invalid, the object may be empty.


New Pure Json Object

New Pure Json Object

Overview

Creates a new, empty JSON object using a pure function. Since this node does not trigger the execution flow, it is ideal for temporary JSON creation in pure logic chains such as function graphs or value assignments.

Note: Because it is a pure function, the generated JSON object exists only during the current frame. Be sure to immediately cache or assign the output, or the data will be lost.

Outputs

  • JSON Object – A new, empty JSON object that can be modified or passed into other JSON-related nodes.

Last updated

Was this helpful?