diff --git a/docs/dev/filters.md b/docs/dev/filters.md index c020c122822..eda715f7cae 100644 --- a/docs/dev/filters.md +++ b/docs/dev/filters.md @@ -491,3 +491,16 @@ Returns an array without the specified element(s). {% set firstEntry = entries[0] %} {% set remainingEntries = entries|without(firstEntry) %} ``` + +## `withoutKey` + +Returns an array without the specified key. + +```twig +{% set array = { + foo: 'foo', + bar: 'bar', + baz: 'baz' +} %} +{% set filtered = array|withoutKey('baz') %} +```