To find if a key/field exists in your document use the $exists operator.
Via the MongoDB shell …
db.things.find( { ln : { $exists : true } } );
More Related Contents:
- How does MongoDB sort records when no sort order is specified?
- How to listen for changes to a MongoDB collection?
- Cascade style delete in Mongoose
- Check that Field Exists with MongoDB
- Find MongoDB records where array field is not empty
- MongoDB – Update an object in nested Array
- Creating Multifield Indexes in Mongoose / MongoDB
- Mongodb Explain for Aggregation framework
- MongoDB aggregation comparison: group(), $group and MapReduce
- MongoDB group by array inner-elements
- mongodb how to get max value from collections
- How to aggregate by year-month-day on a different timezone
- Problems to run examples in Meteor
- mongodb.conf bind_ip = 127.0.0.1 does not work but 0.0.0.0 works
- How to resolve MongoDB failing to instantiate [closed]
- How to use Elasticsearch with MongoDB?
- What is a Cursor in MongoDB?
- Meteor: difference between names for collections, variables, publications, and subscriptions?
- MongoDB – how to query for a nested item inside a collection?
- What’s the fastest way to copy a collection within the same database?
- Mongoose: deep population (populate a populated field)
- How do I rename fields when performing search/projection in MongoDB?
- Update MongoDB collection using $toLower
- mongodb aggregation framework match by nested documents
- Insert json file into mongodb
- Modify and replay MongoDB oplog
- Creating custom Object ID in MongoDB
- Return actual type of a field in MongoDB
- Sort nested array of objects
- How to create a Mongo Docker Image with default collections and data?