twig for associative array code example
Example: twig for loop key
{% for key, user in users %}
<li>{{ key }}: {{ user.username|e }}</li>
{% endfor %}
{% for key, user in users %}
<li>{{ key }}: {{ user.username|e }}</li>
{% endfor %}