title: How to run a FOR loop on a JSONField in Django referring to specific elements
body: <p>I have the following JSONField:</p>
  
  <pre><code>class Flow(models.Model):
      flow_title = models.CharField(max_length=200, null=True)
      flow_data = JSONField(null=True)
  
      def __str__(self):
          return self.flow_title
  </code></pre>
  
  <p>In the <code>flow_data</code> JSONField I have the following JSON:</p>
  
  <pre><code>{
      "section1": {
          "section_title": "Untitled Section 1",
          "section_description": "Section description 1",
          "field1": {
              "field_name": "Untitled field 1",
              "field_type": "Text",
              "field_value": "This is text value 1"
          },
          "field2": {
              "field_name": "Untitled field 2",
              "field_type": "Text",
              "field_value": "This is text value 2"
          }
      },
      "section2": {
          "section_title": "Untitled Section 1",
          "section_description": "Section description 1",
          "field1": {
              "field_name": "Untitled field 1",
              "field_type": "Text",
              "field_value": "This is text value 1"
          },
          "field2": {
              "field_name": "Untitled field 2",
              "field_type": "Text",
              "field_value": "This is text value 2"
          }
      }
  }
  </code></pre>
  
  <p>Now, I know I can pass context in my <code>views.py</code> to create the required object:</p>
  
  <pre><code>def index(request):
      flow_list = Flow.objects.all()
      return render(request, "index.html", {"flow_list": flow_list})
  </code></pre>
  
  <p>And that I can loop through all of my json objects in the template:</p>
  
  <pre><code>{% for object in flow_list %}
      &lt;li&gt;{{ object.id }}&gt;{{ object.flow_data }}&lt;/a&gt;&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
  <p>However, if I want to format individual parts of the JSON in the loop like below, how would I do this?</p>
  
  <pre><code>{% for object in flow_list %} 
  &lt;li&gt;[nth Section]&lt;/li&gt;
  &lt;li&gt;&lt;b&gt;[nth Section Description]&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;[First Field] - [Field Name]&lt;/li&gt;
  &lt;li&gt;[Second Field] - [Field Name]&lt;/li&gt;
  etc.   
  {% endfor %}
  </code></pre>