Skip to content

Array Add

Adds an item to the end of an array.

Inputs#

Port Description
invalid port type: indexable

Outputs#

Port Description
The array with the added item
Index
The index of the added item

Addendum#

A node that is very helpful in combination with the Array Add node is the Freeze node. Basically, the Freeze node provides a value to other nodes until it is replaced.

In the example below, we fill an array with strings using a For Loop node.

The Freeze node provides an initial array and replaces it after each iteration of the loop with the new array from the Array Add node.

After the for loop is completed, the most up-to-date array is available in the output of the Freeze node.

ID: array-add@v1