> 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/v2/functions/filter.md).

# Filter

Expects 1 or more arguments.

Each argument should be a selector.

Filter runs the given selectors against each value from the previous function, and if all selectors return a truthy value, the element is allowed through.

## Examples

```
$ echo '[
  {"label":"x","allow":true},
  {"label":"y","allow":false},
  {"label":"z","allow":true}
  ]' | dasel -r json 'all().filter(allow)'
{
  "allow": true,
  "label": "x"
}
{
  "allow": true,
  "label": "z"
}

```
