apoc.coll.split

Procedure

apoc.coll.split(coll LIST<ANY>, value ANY) - splits a collection by the given value. The value itself will not be part of the resulting LIST<ANY> values.

Signature

apoc.coll.split(values :: LIST<ANY>, value :: ANY) :: (value :: LIST<ANY>)

Input parameters

Name Type Default

values

LIST<ANY>

null

value

ANY

null

Output parameters

Name Type

value

LIST<ANY>

Usage examples

The following splits a collection on the value .:

CALL apoc.coll.split(["Hello", "World", ".", "How", "are", "you", "?"], ".");
Table 1. Results
Value

["Hello", "World"]

["How", "are", "you", "?"]