---
url: /process-functions/hierarchy-wipe.md
description: >-
  Removes every element from a hierarchy. The hierarchy itself, and the
  dimension's elements, are kept.
---

# hierarchy.wipe

Removes every element from a hierarchy. The hierarchy itself, and the dimension's elements, are kept.

```js
hierarchy.wipe(dimension, hierarchy)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `dimension` | `string` | The dimension's name or id. |
| `hierarchy` | `string` | The hierarchy's name. |

## Returns

An empty string when it succeeds, or an error message when the dimension can't be found.

## Examples

```js
hierarchy.wipe("Account", "Default");
```
