how to check field is not empty in mongodb code example Example: mongodb filter empty array db.collection.find({arrayElementName : {$exists:true, $size:0}})