JSON SET

JSON SET

Set New Json Object Field

Set New Json Object Field

Overview

Creates a new, empty JSON object and inserts it into the specified field within an existing JSON object. This is typically used as a setup step for nesting further data inside a parent structure. The newly created object is returned for further use and modification. not the full original JSON object.

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 to which the new nested object should be added.

  • Field Name – The name of the field (as a string) to assign the new empty JSON object to.

Outputs

  • Success – Returns true if the empty object was successfully created and inserted.

  • New Json Object – The newly created empty object, returned for further editing (not the full input object).


Set Json Object Field

Set Json Object Field

Overview

Adds or updates a nested JSON object field inside an existing parent JSON object. This node allows you to insert a fully constructed JSON object into another object under a specified field name. If the field already exists, it will be overwritten with the new object.

Unlike Set New JSON Object Field, which creates a blank object, this version accepts a fully built JSON object and appends it into a larger structure.

Examples

Parent Data

{ "PlayerInfo": { "Name": "ShadowRogue", "Level": 12, "Class": "Assassin", "XP": 3450, "IsAlive": true } }

Data To Insert

{ "PlayerStats": { "Health": 85, "Mana": 60, "Stamina": 40, "Armor": 25, "CriticalChance": 0.15 } }

Combined Data

{ "PlayerInfo": { "Name": "ShadowRogue", "Level": 12, "Class": "Assassin", "XP": 3450, "IsAlive": true }, "PlayerStats": { "Health": 85, "Mana": 60, "Stamina": 40, "Armor": 25, "CriticalChance": 0.15 } }

Inputs

  • JSON Object – he parent JSON object you want to modify.

  • Object Data - The desired data to insert into the parent.

  • Field Name – The name of the field (as a string) under which the object should be stored.

Outputs

  • Success – Returns true if the nested object was successfully inserted.

  • New Json Object – The updated full JSON object, including the newly added or modified field.


Insert Json Object

Insert Json Object

Overview

This node merges one JSON object into another by copying all fields from the Data to Insert object into the JSON Object. If any fields already exist in the target, they will be overwritten by values from the incoming object. The result is a single, combined JSON object containing fields from both inputs.

Note: This operation does not create a nested structure. All top-level fields from both objects are merged into a flat, unified structure.

Examples

Parent Data

{ "PlayerInfo": { "Name": "ShadowRogue", "Level": 12, "Class": "Assassin", "XP": 3450 } }

Data To Insert

{ "PlayerStats": { "Health": 85, "Mana": 60, "Stamina": 40, "Armor": 25 } }

Combined Data

{ "PlayerInfo": { "Name": "ShadowRogue", "Level": 12, "Class": "Assassin", "XP": 3450, "Health": 85, "Mana": 60, "Stamina": 40, "Armor": 25 } }

Inputs

  • JSON Object – The target JSON object that will receive the new fields.

  • Data To Insert – The second JSON object whose fields will be inserted into the first.

Outputs

  • Success – Returns true if the merge was successful.

  • Combined Json – The resulting JSON object containing fields from both input objects.


Set Json Bool Field

Set Json Bool Field

Overview

Adds or updates a Boolean field in a JSON object. This node sets a key–value pair where the value is a Boolean (true or false) and outputs a new JSON object containing the updated field.

Note: If the specified field already exists, its value will be overwritten. If it does not exist, it will be added.

Inputs

  • JSON Object – The input JSON object you want to modify.

  • Field Name – The name of the field (as a string) to add or update.

  • Value - The Boolean value (true or false) to assign to the specified field.

Outputs

  • Success – Returns true if the field was successfully set in the object. Otherwise false.

  • New Json Object – The updated JSON object with the Boolean field set.


Set Json Byte Field

Set Json Byte Field

Overview

Adds or updates a byte value field in a JSON object. This node sets a key–value pair where the value is treated as a byte and outputs a new JSON object containing the updated data.

Note: If the specified field already exists, its value will be overwritten. If it does not exist, it will be added.

Inputs

  • JSON Object – The input JSON object you want to modify.

  • Field Name – The name of the field (as a string) to add or update.

  • Value - The byte value (0–255) to assign to the specified field.

Outputs

  • Success – Returns true if the field was successfully set in the object.

  • New Json Object – The updated JSON object with the new or modified byte field.


Set Json Number Field

Set Json Number Field

Overview

Adds or updates a numeric field (Float) in a JSON object. This node sets a key–value pair where the value is a number (float), and outputs a new JSON object with the updated content.

Note: If the specified field already exists, its value will be overwritten. If it does not exist, it will be added.

Inputs

  • JSON Object – The input JSON object you want to modify.

  • Field Name – The name of the field (as a string) to add or update.

  • Value - The numeric value (float) to assign to the specified field.

Outputs

  • Success – Returns true if the field was successfully set in the object.

  • New Json Object – The updated JSON object with the number (float) field added or changed.


Set Json String Field

Set Json String Field

Overview

Adds or updates a string field in a JSON object. This node sets a key–value pair where the value is a string and outputs a new JSON object containing the updated or newly created field.

Note: If the specified field already exists, its value will be overwritten. If it does not exist, it will be added.

Inputs

  • JSON Object – The input JSON object you want to modify.

  • Field Name – The name of the field (as a string) to add or update.

  • Value - The string value to assign to the specified field.

Outputs

  • Success – Returns true if the field was successfully set in the object.

  • New Json Object – The updated JSON object with the string field included.


Set Json Array Field

Set Json Array Field

Overview

JSON functionality used to add or update an array field in a JSON object. This node sets a field to hold a JSON array, which can contain values of any type (Numbers, strings, objects, or nested arrays), and ensures it is properly formatted for serialization.

Inputs

  • JSON Object – The JSON object you want to modify.

  • Field Name – The name of the field (as a string) to assign the array to.

  • Root Level JSON – If true, all array entries are placed together into a single object where each entry shares the same structure (i.e. same fields, with different values). If false, each array entry is placed into its own individual JSON object, typically with only one field per object.

  • Array Data – The array of values to insert into the JSON object.

Examples

Root Level JSON = false

{ "Inventory": [ { "Name": "Health Potion" }, { "Type": "Weapon" }, { "Effect": "Fireball" } ] }

Root Level JSON = true

[ { "Name": "Health Potion", "Type": "Consumable", "Effect": "Restore 50 HP" }, { "Name": "Iron Sword", "Type": "Weapon", "Damage": 25 }, { "Name": "Magic Scroll", "Type": "Spell", "Effect": "Fireball" } ]

Outputs

  • Success – Returns true if the array was successfully added or updated in the JSON object. Otherwise, returns false.

  • Out Array Data – The JSON array that was written to the specified field or to the root, depending on the configuration.

Last updated

Was this helpful?