{% for key in data %}
{% if 'assignedUser' in key %}
{% for key_1, value_2 in data[key].items() %}
<li>Assigned User: data.values_2()</li>
{% endfor %}
{% endif %}
{% endfor %}
我试图让jinja模板的行为与此python语句类似:
for key in data:
if key == 'assignedUser':
for key_1, value_2 in data[key].items():
print('Assigned User: ' + str(value))
&#39;数据&#39;对象:
{
"assignedUser": {
"username": "name@email.com"
},