如,刪除collections集合中,resumeList中mallId爲1的這一項,刪除後,resumeList只有mallId爲2的這項了
// 刪除doc集合中,resumeList數組裏面mallId屬性值爲mallId這一項
doc.update({$pull:{resumeList:{mallId:mallId}}},function(err2,doc2){
if(err2){
res.json({
status: "1",
msg: "取消收藏失敗"+err2,
});
}else{
res.json({
status: "2",
msg: "取消收藏成功",
});
}
})