Skip to main content

test

Add Json Array Value (String)

Adds a piece of text to the end of a JSON array.

What it does

This node takes a JSON array (a list of items, like ["apple", "cherry"]) and a piece of text, and gives you back a new array with the text added to the end.

The original array isn't modified — what comes out is a new array that includes the new value.

Inputs

Port Type What to connect
Execute Trigger Wire this from the previous node's Execute output. The node only runs when triggered.
JsonArray JSON array The list you want to add to. Often comes from a Create Json Array node, or from a previous step in your scene.
Value Text The piece of text you want to append.

Outputs

Port Type What you get
Execute Trigger Fires after this node finishes. Wire it into whatever should run next.
JsonArray JSON array The updated array with your text added at the end.
Value Text The same text you passed in (in case the next node needs it as well).

Example

JsonArray input ["apple", "cherry"]
Value input "banana"
JsonArray output ["apple", "cherry", "banana"]

Tips

  • Start from empty. To begin a fresh list, wire a Create Json Array node into the JsonArray input.
  • Chain additions. To add several values in a row, feed each node's JsonArray output into the next node's JsonArray input.
  • Other types. This variant is for text. If you need to add a number, a true/false value, an object, or another array, use one of the matching variants below.
  • Add Json Array Value (Number) — add a number to the array
  • Add Json Array Value (Boolean) — add a true/false value
  • Add Json Array Value (JsonObject) — add an object
  • Add Json Array Value (JsonArray) — add a nested array
  • Get Json Array Element (String) — read a text value back out of an array
  • Get Json Array Size — find out how many items the array has
  • Json Array To String — turn the whole array into a single piece of text