Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I'm trying to sort a meta object by date.
{% assign sorted_shows = shop.metaobjects.shows.values | sort: 'show.date' | reverse %}
{% for shows in sorted_shows %}
{{ shows.date }} <br>
{% endfor %}
These are the results I get:
2024-02-09
2025-01-10
2024-02-01
2024-01-26
2024-02-16
any ideas? I'm stumped
From what I have learned Shopify has a glitch when it comes to sorting by Date. This fixes the issue.
{% assign sorted_shows = shop.metaobjects.shows.values | sort_natural: 'date' %}
{% for shows in sorted_shows %}
{{ shows.date }} <br>
{% endfor %}
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025