> For the complete documentation index, see [llms.txt](https://daseldocs.tomwright.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daseldocs.tomwright.me/functions/ignore.md).

# ignore

Marks a value to be ignored, causing it to be excluded from branch output. This is useful in conditional branches where you want to discard certain paths.

#### Syntax

```
ignore()
```

#### Arguments

None.

#### Examples

**Conditionally exclude a value**

```bash
echo '{"name":"Tom","age":30}' | dasel -i json '(name, if (age > 40) { age } else { ignore() })'
```

Output:

```
"Tom"
```

Since `age` is not greater than 40, the `ignore()` branch is taken and only `name` is output.

**Filter branches in a multi-select**

```
(
  name,
  if (has("email")) { email } else { ignore() }
)
```

This outputs `email` only if the field exists, without erroring on missing keys.
