When running checkpoints.js script below
$ mongo -u "admin" -p "xxx" monitor checkpoints.js
it doesn't look like variable 'i' can be used inside db statement ?
for (var i=1; i<8; i++) {
print(i)
print(db.checkpoints.find({day: i}).count())
}
Because it prints zeros for me
1
0
2
0
3
0
4
0
5
0
6
0
7
0
db.checkpoints.find({day: 3}).count()it does return a result ?.find({day: i.toString()})but wasn't sure.