Sorts an object by its keys.
{
"options": {
"size": "M",
"color": "red",
"material": "cotton"
}
}{% assign options = options | sort_key %}
{% for option in options %}
{{- option[0] }}: {{ option[1] }}
{% endfor %}Output
color: red
material: cotton
size: M