title: Accessing dictionary by key in Django template
body: <p>I'm passing a dictionary from my view to a template. So <code>{"key1":"value1","key2":"value2"}</code> is passed in and looping through key,value pairs is fine, however I've not found an elegant solution from access directly in the view from a specific key, say <code>"key1"</code> for example bu json.items["key1"]. I could use some if/then statements, but I'd rather do directly is there a way?</p>
  
  <p>Here is looping code in the html template:</p>
  
  <pre><code>{% for key, value in json.items %} 
    &lt;li&gt;{{key}} - {{value}}&lt;/li&gt;
   {% endfor %}
  </code></pre>