91删除数据
var d_startsec = 245322000, d_endsec = 245323800; var channel_id = 3131; for(var noid = 0;noid <= 682; noid++){ var pointData = db.last.findOne({"channel_id": "" + channel_id,"no_ai": "" + noid,"date": "2017-10-10"}); var zset = pointData.zset; for(var i = 0;i < zset.length;i++){ var hourData = zset[i]; if(hourData.hour == 9){ var dataAry = hourData.dataMin[0]; for(var j = dataAry.length - 3;j >= 0;j-=3){ if(dataAry[j] >= d_startsec && dataAry[j] <= d_endsec){ dataAry.splice(j,3); } } } } db.last.update({"_id": pointData._id},pointData); }