keys

The keys filter returns the keys of an array. It is useful when you want to iterate over the keys of an array:

キー フィルターは、配列のキーを返します。配列のキーを繰り返し処理したい場合に便利です:
1
2
3
{% for key in array|keys %}
    ...
{% endfor %}