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