if exist condition for that field mongodb code example Example: mongodb exists db.records.find( { a: { $exists: true } } )