# any

Returns `true` if any element in an array matches the given predicate. This is an expression — the predicate is evaluated against each element using `$this` to refer to the current element.

#### Syntax

```
<array>.any(predicate)
```

#### Arguments

* **predicate** - A boolean expression evaluated against each element. Use `$this` to refer to the current element.

#### Examples

**Check if any number exceeds a threshold**

```
[1, 2, 3].any($this > 2)
// true
```

```
[1, 2, 3].any($this > 5)
// false
```

**Check a field on objects**

```
[{"age": 20}, {"age": 30}].any($this.age >= 30)
// true
```

**CLI usage — check if any user is an admin**

```bash
$ echo '{"users": [{"role": "user"}, {"role": "admin"}]}' \
  | dasel -i json 'users.any($this.role == "admin")'
true
```


---

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