title: Iterate through JSON data in Django template
body: <p>I am having trouble iterating through some JSON data that I managed to import into my Django Wagtail project. I want to list travel advisories on a website that are pulled in from here: <a href="http://data.international.gc.ca/travel-voyage/index-updated.json" rel="nofollow noreferrer">http://data.international.gc.ca/travel-voyage/index-updated.json</a></p>
  
  <p>I was able to do this in my model like so:</p>
  
  <pre><code>import requests
  
  def get_context(self, request):
      response = requests.get('http://data.international.gc.ca/travel-voyage/index-updated.json')
      json_response = response.json()
  
      data = json_response['data']
  
      context = super(TravelAdvisoriesPage, self).get_context(request)
      context['data'] = data
  
      return context
  </code></pre>
  
  <p>I am now unsure of how to get the data into my template. I am able to pull in all of the data using <code>{{ data }}</code>.</p>
  
  <p>But how do I pull out specific items from that JSON data? I want to grab both the English and French name, url-slug, advisory-text, etc. And all of those are nested within <code>data &gt; country code &gt; language &gt; item</code> within the JSON structure. </p>
  
  <p>I have tried something like:</p>
  
  <pre><code>{% for country in data %}
    {{ data[country].eng.name }}&lt;br /&gt;
  {% endfor %}
  </code></pre>
  
  <p>This is giving me errors like <code>Could not parse the remainder: '[country].eng.name' from 'data[country].eng.name'</code>. How do you grab these in the template? </p>