Retrieve data from mongodb based on date condition in pymongo
问题 My MongoDB document is as follows: - { "_id" : 111, "ts" : [ ISODate("2010-08-21T23:13:35.000Z"), ISODate("2011-08-23T09:13:10.000Z"), ISODate("2012-08-26T12:55:51.000Z"), ISODate("2010-08-29T03:11:12.000Z") ] } { "_id" : 112, "ts" : [ ISODate("2010-08-21T23:13:35.000Z"), ISODate("2011-08-23T09:13:10.000Z"), ISODate("2012-08-26T12:55:51.000Z"), ISODate("2010-08-29T03:11:12.000Z") ] } Each date entry indicates a "hit". I am trying to count the number of hits each id had between a certain date