I am new to MongoDB. I have a data set that consists of field called 'page' which value is given as a string, e.g. '153'. I want to filter out all the entries which page field value that cannot be parsed to integer, so for instance value like 'page 25'. How do you go about doing this? I know if I use $toInt this will change strings to integers, but when it cannot it will throw an error. I am using Python btw.
db.collection.find({'page':{'$toInt':'$page'}})
This converts to integer all the parseable strings but throws out error when it cannot.