Twig forgets array-keys
also you can try this :
{% for key,value in users %} {{ key }}{% endfor %}
or maybe look into the "loop" object defined in the for loop
Maybe this
http://www.twig-project.org/doc/templates.html
By default, a loop iterates over the values of the sequence. You can iterate on keys by using the keys filter:
<h1>Members</h1><ul> {% for key in users|keys %} <li>{{ key }}</li> {% endfor %}</ul>