Skip to content Skip to footer navigation
🏰 Statamic Summit 2027 Feb 16–19 Talks, workshops, and three nights in a German castle. Get Tickets

Filter Empty Modifier

Filters falsy values out of an array or collection, including null, false, 0, '0', empty strings, and empty arrays. Existing keys are preserved.

favorite_things:
- pizza
- null
- ice cream
{{ favorite_things | filter_empty }}
pizza
ice cream