title: Jinja2 Iterate over dictionary that contains list of dictionaries template error
body: <p>I have a Python object that looks like this coming from flask:</p>
  <pre><code>data = {
    &quot;sunday&quot;: [{&quot;key&quot;:&quot;value&quot;}], 
    &quot;monday&quot; : [{&quot;key&quot;:&quot;value&quot;}], 
    &quot;tuesday&quot;: [{&quot;key&quot;:&quot;value&quot;}], 
    &quot;wednesday&quot;: [{&quot;key&quot;:&quot;value&quot;}], 
    &quot;thursday&quot;: [{&quot;key&quot;:&quot;value&quot;}], 
    &quot;friday&quot;: [{&quot;key&quot;:&quot;value&quot;}], 
    &quot;saturday&quot;: [{&quot;key&quot;:&quot;value&quot;}]
  }
  </code></pre>
  <p>In my HTML file, I've tried the following:</p>
  <pre><code>// #1
  {% for key, value in data.items %}
    {% for item in value %}
       &lt;p&gt;{{item.key}}&lt;/p&gt;
    {% endfor %}
  {% endfor %}
  
  // #2
  {% for key, value in data.items() %}
    {% for item in value %}
       &lt;p&gt;{{item.key}}&lt;/p&gt;
    {% endfor %}
  {% endfor %}
  
  // #3
  {% for key, value in data.items %}
  
  {% endfor %}
  
  // #4
  {% for key, value in data.items() %}
  
  {% endfor %}
  </code></pre>
  <p>All of these return the same error:</p>
  <pre><code>jinja2.exceptions.TemplateSyntaxError: Unexpected end of template. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.
  </code></pre>
  <p>The only thing that works is:</p>
  <pre><code>{% for key in data %}
  
  {% endfor %}
  </code></pre>
  <p>But this returns nothing and I can't iterate further. How can I iterate over my dictionary that contains lists of dictionaries and print out values?</p>