To iterate through dictionary in a dictionary in a Python Django template, we can loop through the items with a for loop.
For instance, we write
<table>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
{% for key, values in data.items %}
<tr>
<td>{{key}}</td>
{% for v in values[0] %}
<td>{{v}}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
to loop through the data
dict’s entries with a for loop.
We get the key value pairs with data.items
.