---
title: "transpose · RUAL Documentation"
description: "Transposes the given array of objects to an object with (key: sum)."
canonical: https://docs.rual.nl/block-types/array/array_transpose_data_from_rows_sum
language: en
---

# transpose

This block is part of the [`array`](https://docs.rual.nl/block-types/array) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

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

- 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.

- 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](https://docs.rual.nl/block-types/array/array_transpose_data_from_rows_sum): the `object` out pin feeds [custom field](https://docs.rual.nl/block-types/object/object_get_custom_field).

![Studio canvas example for the transpose block: typical wiring for transpose.](https://docs.rual.nl/canvas-examples/array_transpose_data_from_rows_sum.png)

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).
