Answers for "mongodb find all values of a key"

1

list values of a column mongo

db.collection.distinct('key_value')
Posted by: Guest on August-01-2020
0

mongo find documents that have a certain key

db.coll.find({"mykey":{'$exists': 1}})
Posted by: Guest on July-31-2020

Code answers related to "mongodb find all values of a key"

Browse Popular Code Answers by Language