apoc.coll.removeFunctionDeprecated in 25
|
This function is deprecated.
Use Cypher’s |
Syntax |
|
||
Description |
Removes a range of values from the |
||
Arguments |
Name |
Type |
Description |
|
|
The list to remove values from. |
|
|
|
The starting index in the list to begin removing values from. |
|
|
|
The number of values to remove. The default is: |
|
Returns |
|
||
Usage examples
The following removes the item at index 4 using both APOC and Cypher:
apoc.coll.remove
RETURN apoc.coll.remove([1,3,5,7,9], 4) AS output;
Using Cypher’s coll.remove
RETURN coll.remove([1,3,5,7,9], 4) AS output;
| Output |
|---|
[1, 3, 5, 7] |
The following removes 2 values, starting from index 1 using both APOC and Cypher:
apoc.coll.remove
RETURN apoc.coll.remove([1,3,5,7,9], 1, 2) AS output;
Using Cypher’s coll.remove
RETURN coll.remove(coll.remove([1,3,5,7,9], 1), 1) AS output;
| Output |
|---|
[1, 7, 9] |