Answers for "How to iterate over a dictionary in a jinja Template in Python"

2

jinja2 iterate dict

{% for key, value in dict_item.items() %}
  <h1>Key: {{key}}</h1>
  <h2>Value: {{value}}</h2>
{% endfor %}
Posted by: Guest on July-05-2020
0

python jinja2 loop dict

{% for dict_item in parent_list %}
   {% for key, value in dict_item.items() %}
      <h1>Key: {{key}}</h1>
      <h2>Value: {{value}}</h2>
   {% endfor %}
{% endfor %}
Posted by: Guest on June-07-2021

Code answers related to "How to iterate over a dictionary in a jinja Template in Python"

Browse Popular Code Answers by Language