apoc.coll.sortText

Details

Syntax

apoc.coll.sortText(coll [, conf ])

Description

Sorts the given LIST<STRING> into ascending order.

Arguments

Name

Type

Description

coll

LIST<STRING>

The list of strings to be sorted.

conf

MAP

A map containing a single key locale to indicate which language to use when sorting the strings. The default is: {}.

Returns

LIST<ANY>

Usage examples

The following sort a list of strings:

// n.b. if no locale is provided it takes the default of the machine where neo4j is running on
RETURN apoc.coll.sortText(['Єльська', 'Гусак'], {locale: 'ru'}) as output;
Results
Output

Гусак

Єльська