It is recommended that you use the alternative filters listed below.

sort_by

Alternatives: sort

The sort_by filter sorts an array:

{% for user in users | sort_by('key', true) %}
  ...
{% endfor %}

Arguments

ArgumentDescriptionType
keyThe key to sort by.String
reverseReverse the sorting of the array (default: false).Boolean

Was this helpful?

Copyright © 2024 Blutui.