shuffle

Welcome to our newly overhauled Zephyr pages! See our new Overview, Examples, and Index.
Feedback is welcome at bottom of each page.

Randomly reorganizes the placement of objects in an array.

shuffle(<array>)

Use Case: You want to randomize the order in which users receive their content, not necessarily giving them in a sorted order. Rather, you want to find their top items and then randomize the placement.

Zephyr:

In the Setup:

{content = personalize({"algorithm":"popular","size":10})}
{contentTruffleShuffle = shuffle(content)}
Top