how to search the object by only key from mongodb code example Example: mongo find documents that have a certain key db.coll.find({"mykey":{'$exists': 1}})