javascript - How to find all the items that are not numbers in MongoDB collection? -
javascript - How to find all the items that are not numbers in MongoDB collection? -
i have field in mongodb database contains numbers, nulls, strings, etc well. how can find() these records?
i'm not sure understand question fully. want numbers or non-numbers? anyway, here how can either:
the numbers:
db.stuff.find({my_field: { $type: 1 }})
the others
db.stuff.find({my_field: { $not: {$type: 1 }}})
javascript mongodb mongodb-query
Comments
Post a Comment