List all values of a certain field in mongodb March 4, 2023 by Tarik db.collection.distinct('x') should give you an array of unique values for that field.