apoc.coll.split

Procedure

apoc.coll.split(coll [Any], value Any) - splits a collection by the given value. The value itself will not be part of the resulting lists.

Signature

apoc.coll.split(values :: LIST? OF ANY?, value :: ANY?) :: (value :: LIST? OF ANY?)

Input parameters

Name Type Default

values

LIST? OF ANY?

null

value

ANY?

null

Output parameters

Name Type

value

LIST? OF 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", "?"]