apoc.coll.shuffle

Details

Syntax

apoc.coll.shuffle(coll)

Description

Returns the LIST<ANY> shuffled.

Arguments

Name

Type

Description

coll

LIST<ANY>

The list to be shuffled.

Returns

LIST<ANY>

Usage examples

The following shuffles a list:

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

[7, 5, 9, 3, 1]