Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame^] | 1 | ``keys`` |
2 | ======== | ||||
3 | |||||
4 | The ``keys`` filter returns the keys of an array. It is useful when you want to | ||||
5 | iterate over the keys of an array: | ||||
6 | |||||
7 | .. code-block:: twig | ||||
8 | |||||
9 | {% for key in array|keys %} | ||||
10 | ... | ||||
11 | {% endfor %} |