apoc.coll.shuffle

Function

apoc.coll.shuffle(coll LIST<ANY>) - returns the LIST<ANY> shuffled.

Signature

apoc.coll.shuffle(coll :: LIST<ANY>) :: LIST<ANY>

Input parameters

Name Type Default

coll

LIST<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]