I am trying to delete docs from couchdb by using
function(doc) {
var startdate= new Date(doc.Date);
var enddate= new Date("July 12, 2013 11:13:00");
if(startdate < enddate){
emit([startdate, enddate], doc._id);
doc.remove();
}
}
I am getting the results, but not able to delete them and yes I have used this code in the temp view of the database