# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://daseldocs.tomwright.me/functions/ignore.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
