Skip to content

Array Operations

The Array Operations node allows users to perform various functional transformations on an input array. Operations include filtering, projection, ordering, counting, and more. This node supports both primitive arrays and arrays of objects (dictionaries), making it a versatile tool for list manipulation.

Node Purpose

Use the Array Operations node to extract specific values, filter based on conditions, sort, or restructure array data within your workflow.

Input Fields

LabelInput TypeDescriptionRequiredVisible When
Input ArraytextThe array of values or objects to be manipulated. Example: [{ "Name": "Alice" }, { "Name": "Bob" }]✅ YesAlways
OperationpicklistThe operation to perform on the input array. See supported options below.✅ YesAlways
Property NametextThe name of the property to be used for filtering, selecting, or ordering.⚠️ Only required for: Where, Select, OrderBy, OrderByDescending, DistinctByWhere, Select, OrderBy, OrderByDescending, DistinctBy
ValuetextThe expected value of a property to use in a Where operation.⚠️ Required for WhereWhere
Skip CounttextNumber of items to skip from the beginning of the array.⚠️ Required for SkipSkip
Take CounttextNumber of items to take from the start of the array.⚠️ Required for TakeTake
Output Variable NametextThe name of the variable to store the result of the operation.✅ YesAlways

Supported Operations

OperationDescription
FirstReturns the first item in the array.
LastReturns the last item in the array.
WhereFilters the array where a specific property equals a given value.
SelectProjects a list of values from a specific property in each object.
DistinctRemoves duplicates from the array.
DistinctByRemoves duplicates based on a specific property’s value.
CountReturns the number of items in the array.
SkipSkips a specified number of items from the beginning of the array.
TakeTakes a specified number of items from the start of the array.
OrderByOrders the array ascendingly based on a property’s value.
OrderByDescendingOrders the array descendingly based on a property’s value.

Output

The result of the selected operation is stored in the specified Output Variable Name. This can be referenced by downstream nodes using {VariableName} syntax.

Example

If you want to filter users where Role equals Admin, configure the node as follows:

  • Input Array: {usersArray}
  • Operation: Where
  • Property Name: Role
  • Value: Admin
  • Output Variable Name: filteredAdmins

Error Handling

The node will fail if:

  • Required fields for the chosen operation are missing (e.g., PropertyName or SkipCount)
  • The input array is not in a valid format
  • An unsupported operation name is specified

Remarks

  • Arrays of objects must be in Dictionary<string, object> form to support property-based operations.
  • Outputs are returned in the node's data["Result"] dictionary entry and automatically cleaned of input parameters.

Tentech 2024