mongodb select distinct code example
Example 1: mongodb count distinct
db.collection.distinct('field').length
Example 2: mongodb distinct
Db.collection.distinct('searchField')
Example 3: find distinct in mongodb
db.inventory.distinct( "item.sku", { dept: "A" } )