sample - Liquid Filter Reference - 1.0.0

Filter Name sample
Group Collections
Version 1.0.0

Description

Returns a random sample in random order of all the values for a given collection

Examples

When a number property is provided, it returns random selection of the size of the number provided of the values from the collection:
{{ items | sample: 2 | join: ", " }}
4, 8

Back to Filter List

Back to Liquid Reference for 1.0.0

 

 
Back to Documentation