Hi,
I am trying to access the contents of an array using forloop.counter0
in django templates but I can't get it working.
What I have is
{% for action in my_action_list %}
{{another_list.forloop.counter0}}
{% endfor %}
Where my_action_list
is a list and another_list
is also a list. I have tried doing this manually e.g. {{another_list.0}}
and this works and I have also tried {{forloop.counter0}}
and this is printing out the correct index so not sure why its not working.
Any ideas?