---
url: /process-functions/dimension-elements.md
description: Returns a page of the leaf element names in a dimension.
---

# dimension.elements

Returns a page of the leaf element names in a dimension.

Parent elements aren't included. Each leaf is listed once, even if it's in more than one hierarchy, and orphans (leaves that aren't in any hierarchy) are included.

```js
dimension.elements(dimensionName, offset, count)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `dimensionName` | `string` | The dimension's name. |
| `offset` | `number` | How many elements to skip from the start. |
| `count` | `number` | The most elements to return. |

## Returns

The leaf element names as a JSON string, read with `JSON.parse()`. Returns `"Error: could not find the dimension specified."` when the dimension can't be found.

## Examples

```js
const elements = JSON.parse(dimension.elements("time", 1, 5));
```
