{% if hosts %}
<div class="row">
{% for host in hosts %}
{% if host.type_of == "Backend" %}
<div class="col-sm-3">{{ host.type_of }}</div>
{{ headers.{{ forloop.counter0 }} }}
{% endif %}
{% endfor %}
</div>
{% endif %}
I am sending arrays, hosts and headers from views to my template, I need to get element of header with the current index (getting the header[i])
Error says
Could not parse the remainder: '{{ forloop.counter0' from 'headers.{{ forloop.counter0'
Can't seem to find any examples regarding to this. How can I achieve what I want ?