Skip to content

Commit

Permalink
withoutKey docs
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 17, 2019
1 parent 7b51211 commit a2e22b5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/dev/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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') %}
```

0 comments on commit a2e22b5

Please # to comment.