Appearance
Group By
The Group By node groups rows by a field value, producing an array of group objects. Each group contains the field value, the matching rows, and a count.
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
field | string | -- | Required. The field name to group by. |
Input
Accepts an array of rows.
Output
Returns an array of group objects:
json
[
{
"_group_key": "Electronics",
"_group_items": [
{ "id": 1, "name": "Laptop", "category": "Electronics" },
{ "id": 3, "name": "Phone", "category": "Electronics" }
],
"_group_count": 2
},
{
"_group_key": "Books",
"_group_items": [
{ "id": 2, "name": "Novel", "category": "Books" }
],
"_group_count": 1
}
]Group Object Fields
| Field | Type | Description |
|---|---|---|
_group_key | string | The value of the grouped field. |
_group_items | array | The rows in this group. |
_group_count | number | The number of rows in this group. |
Rows where the field is null are grouped under _null.
Example Use Cases
Group products by category
field: "category"Display with a nested repeater: the outer repeater iterates groups, the inner repeater iterates _group_items.
Group orders by status
field: "status"Show counts per status: { {row._group_key}}: { {row._group_count}} orders.
Group events by date
field: "event_date"Create a date-based event calendar layout.
TIP
Use the _group_count field for summary statistics without needing a separate Math node.