How can I search for the records filtering in a field that has an undefined value:
undefined
db.records.aggregate({ $match: {
Filter it by $type:6, (mongodb referece, note that this type marked as 'deprecated'):
$type:6
db.records.aggregate({ $match: { myField: {'$type':6}, } })