Skip to content

Commit

Permalink
minor #4432 Fix mistake in docs for keys filter (ruudk)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Fix mistake in docs for `keys` filter

Commits
-------

deb37c3 Fix mistake in docs for `keys` filter
  • Loading branch information
fabpot committed Nov 4, 2024
2 parents b99d73c + deb37c3 commit 98e7f71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/filters/keys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ when you want to iterate over the keys of a sequence or a mapping:

.. code-block:: twig
{% for key in [1, 2, 3, 4]|keys %}
{% for key in ['a', 'b', 'c', 'd']|keys %}
{{ key }}
{% endfor %}
{# outputs: 1 2 3 4 #}
{# outputs: 0 1 2 3 #}
{% for key in {a: 'a_value', b: 'b_value'}|keys %}
{{ key }}
Expand Down

0 comments on commit 98e7f71

Please sign in to comment.