From a2e22b5d0c905f80758ca1eb8bd921026f94e409 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Fri, 17 May 2019 16:20:46 -0700 Subject: [PATCH] withoutKey docs --- docs/dev/filters.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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') %} +```