我想通过父id和subdoc对象id的findByIdAndUpdate来更新子文档数组的一个对象。在执行这段代码时,我得到了这个错误: The positional operator did not find the match needed from the query. 当我使用带有filter参数的updateOne时,它可以工作。但我想让更新后的文档作为rest api的json返回。 有没有办法获得更新后的文档? 我的代码: Subject.findByIdAndUpdate(
{ _id: req.params.subjectId, "bookmarks._id