hierarchy.descendants
Returns the leaf elements below a parent element in a hierarchy, at every level. Parent elements along the way aren't included.
js
hierarchy.descendants(dimension, hierarchy, parent)Parameters
| Parameter | Type | Description |
|---|---|---|
dimension | string | The dimension's name or id. |
hierarchy | string | The hierarchy's name or id. |
parent | string | The parent element's name. |
Returns
string | nullThe names of the leaf elements as a JSON string. Read it with JSON.parse(). A leaf that sits under more than one branch is listed once for each. Returns null when the dimension, hierarchy or element can't be found.
Examples
js
const elements = JSON.parse(hierarchy.descendants("Time", "Days Since Release", "Days Since Release"));