Sort dict of dict in jinja2 loop
jinja2 has a perfect solution for it
do_dictsort(value, case_sensitive=False, by='key')
{% for item in mydict|dictsort %}
sort the dict by key, case insensitive
{% for item in mydict|dicsort(true) %}
sort the dict by key, case sensitive
{% for item in mydict|dictsort(false, 'value') %}
sort the dict by key, case insensitive, sorted
normally and ordered by value.
Solution:
my_dict.items()|sort(attribute='1.name')