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

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -