Find documents that have or do not have a field.
Section: Filter patterns
Check field existence
javascript
javascript
db.orders.find({ shipped_at: { $exists: false } })Explanation
Helpful when auditing incomplete data or backfills.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Filter patterns