shuffle

Table of contents

Randomizes the order of an array.

Combine with first to get a random item

{% assign myArray = 'one,two,three,four' | split: ',' -%}
{{ myArray | shuffle }}
Input
"two,four,three,one"
Output example

Need help?

Do you have any question which is not answered in this knowledge base? Contact us. We are here to help you.