title: filter
---
summary: Filters a query down by an expression.
---
type: method
---
signature: expr
---
body:

This filters a query further down by an [Expression :ref](../../expression/).
Most expressions involve filtering by fields through [F :ref](../../f/)
which allows you to perform comparisons with values that fields have.

Multiple filter calls can be chained as an alternative to using an `and`
expression.

## Example

Here a basic example of how to filter something in a template:

```html+jinja
<ul>
{% for item in this.children.filter(F.status == 'published') %}
  <li>{{ item.title }}</li>
{% endfor %}
</ul>
```
