I tried:
list1 = [{"username": "abhi", "pass": 2087}]
return render_template("file_output.html", list1=list1)
In the template:
<table border=2>
<tr>
<td>
Key
</td>
<td>
Value
</td>
</tr>
{% for dictionary in list1 %}
{% for key in dictionary %}
<tr>
<td>
<h3>{{ key }}</h3>
</td>
<td>
<h3>{{ dictionary[key] }}</h3>
</td>
</tr>
{% endfor %}
{% endfor %}
</table>
The above code is splitting each element into multiple characters:
[
{
"
u
s
e
r
...
I tested the above nested loop in a simple Python script and it works fine but not in Jinja template.