Search K
Appearance
Appearance
The Array Operations node transforms input arrays through operations like filtering, projection, ordering, counting, and aggregation. It works with both simple arrays and arrays of objects, making it a flexible tool for preparing and manipulating list data.
No external service or node dependencies are required for this node.
| Operation | Description |
|---|---|
| First | Returns the first item in the array. |
| Last | Returns the last item in the array. |
| Where | Filters the array where a specific property equals a given value. |
| Select | Projects a list of values from a specific property in each object. |
| Distinct | Removes duplicates from the array. |
| DistinctBy | Removes duplicates based on a specific property’s value. |
| Count | Returns the number of items in the array. |
| Skip | Skips a specified number of items from the beginning of the array. |
| Take | Takes a specified number of items from the start of the array. |
| OrderBy | Orders the array ascendingly based on a property’s value. |
| OrderByDescending | Orders the array descendingly based on a property’s value. |
| Label | Input Type | Description | Required | Visible When | Default | Example |
|---|---|---|---|---|---|---|
| Input Array | text | The array of values or objects to be manipulated. | ✅ Yes | Always | Null | {usersArray} |
| Operation | picklist | The operation to perform on the input array. See supported options below. | ✅ Yes | Always | Null | Where |
| Property Name | text | The name of the property to be used for filtering, selecting, or ordering. | ⚠️ When Visible | When operation is Where, Select, OrderBy, OrderByDescending, DistinctBy | Null | "Department" |
| Value | text | The expected value of a property to use in a Where operation. | ⚠️ When Visible | When Operation is Where | Null | "Engineering" |
| Skip Count | text | Number of items to skip from the beginning of the array. | ⚠️ When Visible | When Operation is Skip | Null | "2" |
| Take Count | text | Number of items to take from the start of the array. | ⚠️ When Visible | When Operation is Take | Null | "4" |
The result of the selected operation is stored in the specified Output Variable Name. This can be referenced by downstream nodes using {VariableName} syntax.
Selects the first value from the Input Array.
| Field | Value |
|---|---|
| Input Array | {{usersArray}} = [John, Cameron, Linda] |
| Operation | First |
| Output | John |
Selects the last value from the Input Array.
| Field | Value |
|---|---|
| Input Array | {{usersArray}} = [John, Cameron, Linda] |
| Operation | Last |
| Output | Linda |
Filters users by Role = Admin.
| Field | Value |
|---|---|
| Input Array | {{usersDict}} = [{Name: John, Role: User}, {Name: Cameron, Role: Admin}] |
| Operation | Where |
| Property Name | Role |
| Value | Admin |
| Output | [{Name: Cameron, Role: Admin}] |
Selects all user names from the array.
| Field | Value |
|---|---|
| Input Array | {{namesArray}} = [{Name: John}, {Name: Cameron}, {Name: Linda}] |
| Operation | Select |
| Property Name | Name |
| Output | [John, Cameron, Linda] |
Removes duplicate values.
| Field | Value |
|---|---|
| Input Array | {{lettersArray}} = [A, A, B, C, B] |
| Operation | Distinct |
| Output | [A, B, C] |
Removes duplicate objects based on the City property.
| Field | Value |
|---|---|
| Input Array | {{CitiesArray}} = [{City: NY}, {City: LA}, {City: NY}] |
| Operation | DistinctBy |
| Property Name | City |
| Output | [{City: NY}, {City: LA}] |
Counts how many users are in the array.
| Field | Value |
|---|---|
| Input Array | {{usersArray}} = [John, Cameron, Linda] |
| Operation | Count |
| Output | 3 |
Skips the first 2 users.
| Field | Value |
|---|---|
| Input Array | {{usersArray}} = [John, Cameron, Linda, Sarah] |
| Operation | Skip |
| Skip Count | 2 |
| Output | [Linda, Sarah] |
Takes the first 2 users.
| Field | Value |
|---|---|
| Input Array | {{usersArray}} = [John, Cameron, Linda, Sarah] |
| Operation | Take |
| Take Count | 2 |
| Output | [John, Cameron] |
Sorts users by Age ascending.
| Field | Value |
|---|---|
| Input Array | {{userDetailsArray}} = [{Name: John, Age: 30}, {Name: Linda, Age: 25}] |
| Operation | OrderBy |
| Property Name | Age |
| Output | [{Name: Linda, Age: 25}, {Name: John, Age: 30}] |
Sorts users by Age descending.
| Field | Value |
|---|---|
| Input Array | {{userDetailsArray}} = [{Name: John, Age: 30}, {Name: Linda, Age: 25}] |
| Operation | OrderByDescending |
| Property Name | Age |
| Output | [{Name: John, Age: 30}, {Name: Linda, Age: 25}] |
| Error Condition | Description |
|---|---|
| Required Parameters 'Parameter Name' not found | A required node parameter field has been left blank |
| Unhandled Error: Unable to cast object of type | Invalid type has been provided in a node parameter field, a previously generated {variable} |