I am trying to write an aggregation to identify accounts that use multiple payment sources. Typical data would be.
{ account:\"abc\", vendor:\"amazon\", }
An example
db.collection.distinct("example.item").forEach( function(docs) { print(docs + "==>>" + db.collection.count({"example.item":docs})) });