Array GroupBy Documentation
Module ID: 1ce639a0-2014-47c7-86b0-dd6366c87438
Version: 1.0.1
Retrieved: 2025-10-09 15:15:09
Array GroupBy
Split an array of objects into sub-arrays based on the value of a selected property, similar to "GROUP BY" in SQL.
Settings
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Source Property | string with length 1-64 | Property with the input array. | data |
| Group Property | string with length 1-64 | Property in the array elements with the discrete values used for grouping. | |
| Target Property | string with length 1-64 | Property that will contain the output messages. | data |
Example
Settings
Source Property: data Group Property: country Target Property: data
Input
{
"data": [
{
"country": "Sweden",
"city": "Stockholm",
"temperature": -3
},
{
"country": "Sweden",
"city": "Sundsvall",
"temperature": -15
},
{
"country": "Norway",
"city": "Oslo",
"temperature": 12
},
{
"country": "Norway",
"city": "Stavanger",
"temperature": -1
},
]
}
Output
We will get two output messages since we find two groups based on the Group Property that is country.
Output Message 1
{
"data": {
"group": "Sweden",
"array": [
{
"country": "Sweden",
"city": "Stockholm",
"temperature": -3
},
{
"country": "Sweden",
"city": "Sundsvall",
"temperature": -15
}
]
}
}
Output Message 2
{
"data": {
"group": "Norway",
"array": [
{
"country": "Norway",
"city": "Oslo",
"temperature": 12
},
{
"country": "Norway",
"city": "Stavanger",
"temperature": -1
}
]
}
}
Search Documentation