Skip to main content

I have an array that I want to sort by expiration date. I’m getting mixed messages on if and how this can be done. I would love any guidance with this code. 

{% for reward in person.x_activeRewards %}
<div>
<p>{{ reward.expirationDate }}</p>
</div>
{% endfor %}

 

testing to make sure this thing is on. 


Hey @Bryce 

I am not 100% sure but can you try to use the ‘sort’ filter?

something like this - {% assign sorted_rewards = person.x_activeRewards | sort: 'expirationDate' %}

 

Let me know if this works

Cheers,


Reply