transpose

This block is part of the array group and was last modified in core v10.4.28.

transpose v10.4.28

Transposes the given array of objects to an object with (key: sum).

In pins 3
  • array required
    array

    Input pin for the array of objects to be transposed.

  • key required
    value

    Input pin for the key to use for the resulting object.

  • sum-key required
    value

    Input pin for the key to use for summing the values in the array.

Out pins 1
  • object
    object

    Output pin for the transposed object with (key: sum) format.

Builds an object from an array of objects: each item's value at the key path (stringified) becomes a property whose value accumulates the SUM of that item's sum_key values; a missing or non-numeric sum value adds 0. Items that are not objects or lack the key field are skipped. Example: [{k:a,v:1},{k:a,v:2}] with key k, sum-key v -> {a:3}.

A typical wiring for transpose: the object out pin feeds custom field.

Studio canvas example for the transpose block: typical wiring for transpose.

Version history

Introduced in v10.4.28.


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