apoc.coll.containsDuplicates

Details

Syntax

apoc.coll.containsDuplicates(coll)

Description

Returns true if a collection contains duplicate elements.

Arguments

Name

Type

Description

coll

LIST<ANY>

The list to check for duplicates in.

Returns

BOOLEAN

Usage examples

The following indicates whether a list contains duplicate values:

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

true