mongodb query exists and or code example Example: mongodb exists db.records.find( { a: { $exists: true } } )