apoc.coll.frequenciesAsMap
Function APOC Core
apoc.coll.frequenciesAsMap(coll) - return a map of frequencies of the items in the collection, key item
, value count
(e.g., {1:2, 2:1}
)
Usage Examples
The following returns a map containing each item and their frequency in a collection:
RETURN apoc.coll.frequenciesAsMap([1,3,5,7,9,9]) AS output;
Output |
---|
|
Was this page helpful?