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

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

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