check field available mongodb filter code example
Example 1: mongodb exists
db.records.find( { a: { $exists: true } } )
Example 2: mongodb find all that dont have property
db.things.find( { a : { $exists : false } } ); // return if a is missing
db.records.find( { a: { $exists: true } } )
db.things.find( { a : { $exists : false } } ); // return if a is missing