发布网友 发布时间:2022-04-23 08:52
共1个回答
热心网友 时间:2022-04-09 13:13
node.js中删除monogodb数组子文档使用$pull关键词
参考代码:
var filter = {_id: suggestID};
var update = {$pull: {replies: {rid:opts.doc.rid}}};
return opts.dbs.csdb.collection("suggests").findOneAndUpdateAsync(filter, update, {upsert: false})