Array nodes

Array nodes work with lists of values, such as the parts produced by String Split. See how nodes work for how to read the diagrams below.

Array Length

Counts the items in a list.

Array LengthExecuteArrayDoneLength
Inputs
ExecuteFlow
ArrayArray
Outputs
DoneFlow
LengthNumber
0 when the input is not connected.

For Each

Runs a branch once for every item in a list.

For EachExecuteArrayLoop BodyCurrent ItemCurrent IndexCompleted
Inputs
ExecuteFlow
ArrayArray
Outputs
Loop BodyFlow
Runs once per item.
Current ItemAny
Current IndexNumber
Position of the item, counting from 0.
CompletedFlow
Runs after the last item.

Items are handled one at a time, and each Loop Body run finishes before the next item starts. An empty or unconnected list goes straight to Completed. A single value that is not a list, including text, is treated as a one-item list.

Select Array Index

Gets the item at a position in a list.

Select Array IndexExecuteArrayIndexDoneResult
Inputs
ExecuteFlow
ArrayArray
IndexNumber
Overrides the property when connected.
Outputs
DoneFlow
ResultString
The item as text. Empty when the index is out of range.
Properties
Index
Position to read, counting from 0. Default 0.

This works with lists from nodes such as String Split. To read an item from a parsed JSON array, use JSON Path Get with a path like [0].

Array Contains

Checks whether a list contains a value.

Array ContainsExecuteArrayValueDoneContainsIndex
Inputs
ExecuteFlow
ArrayArray
ValueAny
Outputs
DoneFlow
ContainsBoolean
IndexNumber
Position of the first match, counting from 0, or -1 if there is none.
Properties
Ignore String Case
Default on.

Values that can be read as numbers are compared as numbers, so 5 matches "5".

Array Filter

Keeps only the items in a list that match a rule.

Array FilterExecuteArrayCompare ValueDoneResultCountHas Any
Inputs
ExecuteFlow
ArrayArray
Compare ValueAny
Overrides the property when connected.
Outputs
DoneFlow
ResultArray
The matching items, in their original order.
CountNumber
Has AnyBoolean
Properties
Mode
Equals, Not Equals, Contains, Starts With, Ends With, Greater Than, Less Than, or Truthy. Default Equals.
Compare Value
Default empty.
Ignore Case
Default on.

Each item is compared with Compare Value using Mode:

  • Contains, Starts With, and Ends With compare text. When Compare Value is empty they keep every item.
  • Greater Than and Less Than compare numbers and drop items that are not numbers.
  • Truthy ignores Compare Value and keeps items that are not empty, false, 0, or blank text.

Contributors

Thank you to everyone who has helped improve this documentation.