Can I sort blocks by multiple fields in a custom section?

Is it possible to add a secondary sort field when sorting blocks? I created a custom section to display logos and I want to sort them first by State, then by Name.

I am currently using this code to sort just by the state, but I haven’t figured out if I can add a second field. Do I add two “sort” keywords or maybe just a comma-delimited list in the “sort” value?

{% assign dealers = section.blocks | map: “settings” | sort: “state” %}

1 Like