Group
The Group node organizes a flat JSON array into grouped subsets based on one or more field values. This is analogous to a SQL GROUP BY operation. The output is a structured object where each group key maps to an array of matching items.
Actions
| Action | Description |
|---|---|
json:group | Group elements of a JSON array by specified fields |
json:group
Groups input array elements by the values of one or more specified fields.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | array | Yes | The JSON array to group. Can be a variable reference (e.g., {{previousStep.data}}) |
groupBy | array | Yes | List of field names to group by |
includeCount | boolean | No | Include a count of items in each group. Defaults to false |
Example: Group by single field
Example: Group by multiple fields
Given an input array like:
Grouping by department produces:
Connection
No connection required. This is a data transformation node that operates on in-memory data.