how to get unique objects from mongodb code example
Example 1: mongodb distinct
Db.collection.distinct('searchField')
Example 2: find distinct in mongodb
db.inventory.distinct( "item.sku", { dept: "A" } )
Db.collection.distinct('searchField')
db.inventory.distinct( "item.sku", { dept: "A" } )