apoc.coll.containsDuplicates

Function APOC Core

apoc.coll.containsDuplicates(coll) - returns true if a collection contains duplicate elements

Signature

apoc.coll.containsDuplicates(coll :: LIST? OF ANY?) :: (BOOLEAN?)

Input parameters

Name Type Default

coll

LIST? OF ANY?

null

Usage Examples

The following indicates whether a list contains duplicate values:

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

true