apoc.coll.sort

Function

apoc.coll.sort(coll LIST<ANY>) - sorts the given `LIST<ANY> into ascending order.

Signature

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

Input parameters

Name Type Default

coll

LIST<ANY>

null

Usage examples

The following sorts a collection:

RETURN apoc.coll.sort([5,4,2,3,1]) AS output;
Table 1. Results
Output

[1, 2, 3, 4, 5]