apoc.coll.split

Details

Syntax

apoc.coll.split(coll, value) :: (value)

Description

Splits a collection by the given value. The value itself will not be part of the resulting LIST<ANY> values.

Input arguments

Name

Type

Description

coll

LIST<ANY>

The list to split into parts.

value

ANY

The value to split the given list by.

Return arguments

Name

Type

Description

value

LIST<ANY>

The split list.

Usage examples

The following splits a collection on the value .:

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

["Hello", "World"]

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