apoc.coll.insert
Function
apoc.coll.insert(coll [Any], index Integer, value Any)
- inserts a value into the specified index in the list.
Signature
apoc.coll.insert(coll :: LIST? OF ANY?, index :: INTEGER?, value :: ANY?) :: (LIST? OF ANY?)
Usage examples
The following inserts the value 11
at index 3
in the list:
RETURN apoc.coll.insert([1,3,5,7,9], 3, 11) AS output;
Output |
---|
[1, 3, 5, 11, 7, 9] |
Was this page helpful?