how to get distinct values in mongodb using java code example Example: find distinct in mongodb db.inventory.distinct( "item.sku", { dept: "A" } )