---
title: "get aggregation buckets · RUAL Documentation"
description: "Returns aggregation buckets from the given array."
canonical: https://docs.rual.nl/block-types/array/array_get_buckets
language: en
---

# get aggregation buckets

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

Returns aggregation buckets from the given array.

- Array required `array` The array from which to retrieve aggregation buckets.

- Array `array` An array of objects representing aggregation buckets.

Reads ONLY the first element of the input, expects it to be an aggregation result object, and outputs the buckets array found under its alphabetically first key; every other input element is ignored. Outputs an empty array when the input is empty, the first element is not an object, or no buckets array is found there.

A typical wiring for [get aggregation buckets](https://docs.rual.nl/block-types/array/array_get_buckets): the `array` out pin feeds [length](https://docs.rual.nl/block-types/array/array_length).

![Studio canvas example for the get aggregation buckets block: typical wiring for get aggregation buckets.](https://docs.rual.nl/canvas-examples/array_get_buckets.png)

### Version history

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