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