This is the data
{
    "username": "runrun",
    "channel": "all",
    "expire": NumberLong("1308183908743"),
    "_id": ObjectId("4df93f54e07324af47000001")
}
This is the code I used to use to remove a record
db.collection('seesion',function(err, collection){
    collection.remove({
        "expire": {"$lte": Date.now()}
    },function(err, removed){
        console.log(removed);
    });
});
I want to delete the session which has been expired. Problem is, the code doesn't work, maybe there is something to do with numberLong ?
It looks like you misspelled "session" (as "seesion").
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With