title: Check if key exists in a Python dict in Jinja2 templates
body: <p>I have a python dictionary:</p>
  
  <pre><code>settings = {
     "foo" : "baz",
     "hello" : "world"
  }
  </code></pre>
  
  <p>This variable <code>settings</code> is then available in the Jinja2 template. </p>
  
  <p>I want to check if a key <code>myProperty</code> exists in the <code>settings</code> dict within my template, and if so take some action: </p>
  
  <pre><code>{% if settings.hasKey(myProperty) %}
     takeSomeAction();
  {% endif %}
  </code></pre>
  
  <p>What is the equivalent of <code>hasKey</code> that I can use?</p>