Help for this page

Select Code to Download


  1. or download this
    > db.collection.find();
    { "_id" : ObjectId("55ffec992363a42957aebea8"), "Date" : "14-11-2014",
    + "Value" : 25.36 }
    ...
    { "_id" : ObjectId("55ffecc02363a42957aebeaf"), "Date" : "14-06-2015",
    + "Value" : 25.36 }
    { "_id" : ObjectId("55ffecc42363a42957aebeb0"), "Date" : "14-07-2015",
    + "Value" : 25.36 }
    { "_id" : ObjectId("55ffecc82363a42957aebeb1"), "Date" : "14-08-2015",
    + "Value" : 25.36 }
    
  2. or download this
    var cursor = db.collection.find()
    while (cursor.hasNext()) {
    ...
       db.collection.remove({_id : doc._id})
     }     
    }