title: Display JSON as template list in django
body: <p>I have following JSON document:</p>
  
  <pre><code>{
    "document": {
      "section1": {
        "item1": "Item1Value",
        "item2": "Item2Value"
      },
      "section2": {
        "item1": "Item1Value",
        "item2": "Item2Value"
      },
      "section3": {
        "item1": "Item1Value",
        "item2": "Item2Value"
      }
    }
  }
  </code></pre>
  
  <p>Which I want to display in my django template. This document will be dynamic, so I want to display each sections dynamically. I am passing parsed (by json.loads()) string to the template.</p>
  
  <p>I tried something like:</p>
  
  <pre><code>{% for section in json.document %}
      &lt;div class="section"&gt;
          &lt;h4&gt;&lt;a href="#" class="section_toggle"&gt;&lt;/a&gt;  {{ section|title }}:&lt;/h4&gt;
          &lt;table class="table table-condensed"&gt;
              {% for field in json.document.section %}
                  {{ field }} {# &lt;---- THIS should print item1, item2... Instead, its printing "section1" letter by letter etc #}
              {% endfor %}
          &lt;/table&gt;
      &lt;/div&gt;
  
  {% endfor %}
  </code></pre>
  
  <p>But it doesn't printting section's items properly. Any help?</p>