Skip to content

dimension.item ​

Returns the name of the leaf element at a position in a dimension.

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

js
dimension.item(dimensionName, index)

Parameters ​

ParameterTypeDescription
dimensionNamestringThe dimension's name.
indexnumberThe element's position, starting at 0.

Returns ​

string

The element's name, or "" when there's no element at that position. Returns "Error: can not find any dimension with that name." when the dimension can't be found.

Examples ​

js
const elementName = dimension.item("time", 1);