apoc.coll.indexOf

Function APOC Core

apoc.coll.indexOf(coll, value) | position of value in the list

Signature

apoc.coll.indexOf(coll :: LIST? OF ANY?, value :: ANY?) :: (INTEGER?)

Input parameters

Name Type Default

coll

LIST? OF ANY?

null

value

ANY?

null

Usage Examples

The following returns the index of the value 3 in the list:

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

1