I would like to do a jinja for loop on my dictionary and sort by the value of name
dict example
things:
1:
name: afoo
2:
name: zfoo
3:
name: bfoo
4:
name: cfoo
Jinja gathered from documentation
{%- for thing, property in things|dictsort('name') %}
foo "{{ property.name }}" bar
{%- endfor %}
results in
foo afoo bar
foo zfoo bar
foo bfoo bar
foo cfoo bar
I've tried quite a few iterations of dictsort() and sort() using different values in place of name
like property.name
or thing.name
and had no luck, obviously I'm missing something, the documentation on this sort function is pretty lite.