Platform DocumentationPlatform Documentation
Device TemplateWorkflowsNodes

Array Operation

Perform operations on arrays in your workflows.

The Array Operation node performs operations on array data, such as filtering, sorting, and extracting values. This is essential for processing collections of data.

Overview

The Array Operation node allows workflows to manipulate arrays of data — for example, filtering historical readings or extracting specific values from a dataset.

Array Operation Screenshot

How It Works

  1. Provide an input array (from Get History or other data nodes)
  2. Configure the operation to perform on the array
  3. The result is passed to connected nodes

Configuration

SettingDescription
Input ArrayThe array to operate on (or variable)
OperationType of operation to perform
FilterOptional filter condition
ResultOutput variable name

Supported Operations

OperationDescriptionExample
FilterKeep items matching conditionvalue greater than 30
SortSort by field or valueascending
MapTransform each itemvalue * 1.8
ReduceAggregate to single valuesum, average
UniqueRemove duplicatesdistinct
SliceGet subset of arrayfirst 10 items

Use Cases

  • Data filtering — Keep only values above threshold
  • Aggregation — Calculate sum, average, min, max
  • Data transformation — Convert units for all items
  • Deduplication — Remove duplicate readings

Example: Filter and Average

Node: Get History
  Datastream: "temperature"
  Time Range: Last 24 hours

Node: Array Operation
  Input: {history}
  Operation: Filter
  Condition: value > 30

Node: Array Operation
  Input: {filtered}
  Operation: Reduce
  Function: average

→ Result: highTempAverage

Best Practices

  • Always check if input array is empty before operations
  • Use filter operations to reduce data early in the workflow
  • Document expected array structure
  • Handle edge cases (empty results, null values)

Limitations

  • Large arrays may impact workflow performance
  • Complex operations require multiple nodes
  • Memory is limited per workflow execution

Next Steps

Connect array operation output to action nodes for processing filtered data, or to calculation nodes for aggregations.

On this page