group by to map

This block is part of the array group and was last modified in core v14.0.4.

group by to map v14.0.4

Groups the elements of the given array by a specified field and returns them as a map.

In pins 2
  • Array required
    array

    The array of objects to be grouped.

  • field required
    value

    The field based on which to group the objects.

Out pins 1
  • map
    object

    An object with the value of the given field as keys and all items with the same value as values.

Outputs an object mapping the TEXT of each item's field value to the array of items carrying that value, preserving item order within each group. Non-object items and items lacking the field collect under the key "none". field defaults to "group" when unwired.

A typical wiring for group by to map: the object out pin feeds custom field.

Studio canvas example for the group by to map block: typical wiring for group by to map.

Version history

Introduced in v14.0.4.


Back to array Return to the main group to view all sub-groups Back to array Return to the group to view all blocks within this group