Skip to main content
Groups items from a list by the value of a specific key.

Fields

Pattern

Required. Dot-notated path to the array of items to group, e.g. products.*. Must include * to iterate over items.

Path

Required. Dot-notated path within each item to the value to group by, e.g. category. Items with the same value at this path are grouped together.

Destination

Required. Dot-notated path where the grouped result is written, e.g. grouped.

Sample data

Pattern: products.* Path: category Destination: grouped Input:
{
    "products": [
        { "sku": "A1", "category": "shoes" },
        { "sku": "B2", "category": "bags" },
        { "sku": "C3", "category": "shoes" }
    ]
}
Output:
{
    "grouped": {
        "shoes": [
            { "sku": "A1", "category": "shoes" },
            { "sku": "C3", "category": "shoes" }
        ],
        "bags": [
            { "sku": "B2", "category": "bags" }
        ]
    }
}