I'm trying to sort the rows of a view in the table template but can't figure out how to sort by a particular column. I can only get it to sort by the first column. I'm trying to sort a views global conditional field so I can't use views query alter. Here's the code that sorts by the first column. I've tried various arrow functions without any luck.((a, b) => a.row.column <=> b.row.column).
<tbody>
{% for row in rows|sort %}
<tr{{ row.attributes }}>
{% for key, column in row.columns %}
{% if column.default_classes %}
dump
function would help this Question out.