if you can live with ordering your data outside jinja and then just displaying it, you could do this:
from jinja2 import Template
from collections import OrderedDict
tmplt = Template('''
{% for id, data in od.items() if data.is_sth %}
{{id}}, {{data}}
{% endfor %}
''')
od = OrderedDict((key, value) for key, value in
sorted(my_dict.items(), key=lambda x: x[1]['name']))
print(tmplt.render(od = od))
which gives:
xyz, {'name': 'A', 'is_sth': True}
abc, {'name': 'B', 'is_sth': True}
other than that you'd probably have to create a custom filter.