{% filter capitalize %} {% for item in [5,2,1,"four"]|sort %} {{ item }} {% endfor %} {% endfilter %}