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