apoc.coll.remove

Function

apoc.coll.remove(coll LIST<ANY>, index INTEGER, length INTEGER) - removes a range of values from the LIST<ANY>, beginning at position index for the given length of values.

Signature

apoc.coll.remove(coll :: LIST<ANY>, index :: INTEGER, length = 1 :: INTEGER) :: LIST<ANY>

Input parameters

Name Type Default

coll

LIST<ANY>

null

index

INTEGER

null

length

INTEGER

1

Usage examples

The following removes 2 values, starting from index 1:

RETURN apoc.coll.remove([1,3,5,7,9], 1, 2) AS output;
Table 1. Results
Output

[1, 7, 9]