field exists and equals in mongoose code example Example: mongodb exists db.records.find( { a: { $exists: true } } )