apoc.coll.shuffle

Function APOC Core

apoc.coll.shuffle(coll) - returns the shuffled list

Signature

apoc.coll.shuffle(coll :: LIST? OF ANY?) :: (LIST? OF ANY?)

Input parameters

Name Type Default

coll

LIST? OF ANY?

null

Usage Examples

The following shuffles a list:

RETURN apoc.coll.shuffle([1,3,5,7,9]) AS output;
Table 1. Results
Output

[7, 5, 9, 3, 1]