apoc.coll.duplicatesWithCount
Function APOC Core
apoc.coll.duplicatesWithCount(coll) - returns a list of duplicate items in the collection and their count, keyed by item
and count
(e.g., [{item: xyz, count:2}, {item:zyx, count:5}]
)
Usage Examples
The following returns duplicates in a list of maps containing an item and its count:
RETURN apoc.coll.duplicatesWithCount([1,3,5,7,9,9]) AS output;
Output |
---|
|
Was this page helpful?