title: Jinja2 - How to loop a json list?
body: <p>How can I loop a json list with jinja2?</p>
  
  <p>I have this json list,</p>
  
  <pre><code>[
      {
          "first_name": "John",
          "last_name": "Smith",
          "user_id": 4,
          "address": null
      },
      {
          "first_name": "Jane",
          "last_name": "Heart",
          "user_id": 5,
          "address": null
      },
      {
          "first_name": "Dom",
          "last_name": "Robinsons",
          "user_id": 6,
          "address": null
      },
      {
          "first_name": "Pete",
          "last_name": "Hand",
          "user_id": 7,
          "address": null
      }
  ]
  </code></pre>
  
  <p>page.html,</p>
  
  <pre><code>&lt;table&gt;
     {% for user in users %}
     &lt;tr&gt;&lt;td&gt;{{ user.first_name }}&lt;/td&gt;&lt;/tr&gt;
     {% endfor %}
  &lt;/table&gt;
  </code></pre>
  
  <p>Result,</p>
  
  <pre><code>&lt;table&gt;
  
     &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  
     &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  
     &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  
     &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
     ...
  </code></pre>
  
  <p>Any ideas?</p>