Skip to content
Log in

sample - Liquid Filter Reference

On this page

Description

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

Property Value
Return Type list
Category collections

Examples

liquid {{ numbers | sample: 2 | join: ", " }}

Output: 4, 8

Was this article helpful?

Was this article helpful?