keys

The keys filter will return the keys of an array, as such, it should only be used with array values.

This filter is useful when you want to iterate over the keys of an array.

{% for key in array|keys %}
   ...
{% endfor %}

< Back to the list of filters