how to check if value exists in mongodb object code example Example: mongodb check if field exists db.records.find( { a: { $exists: true } } )