Shuffle lists and strings
Shuffling lists and strings
Here is an example of using the shuffle function to randomly reorder elements in both lists and strings.
-
start: return: shuffled_list: {{shuffle([1,2,3,4,5,6,7,8,9,10])|json_encode}} shuffled_text: {{shuffle("abcdefghijklmnopqrstuvwxyz"|split(''))|join('')}}
-
__return: shuffled_list: '[2,4,5,1,7,10,8,9,6,3]' shuffled_text: wrgpudtahnqjemklsfizoybvcx