apoc.coll.reverse

Function APOC Core Deprecated

apoc.coll.reverse(coll) - returns reversed list

Signature

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

Input parameters

Name Type Default

coll

LIST? OF ANY?

null

Usage Examples

The following reverses a collection:

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

[1, 2, 3, 4, 5]