apoc.coll.duplicates

Details

Syntax

apoc.coll.duplicates(coll)

Description

Returns a LIST<ANY> of duplicate items in the collection.

Arguments

Name

Type

Description

coll

LIST<ANY>

The list to collect duplicate values from.

Returns

LIST<ANY>

Usage examples

The following returns a list of duplicates in a list:

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

[9]