Node.js 如何在mongodb中更新嵌套数组

Node.js 如何在mongodb中更新嵌套数组,node.js,mongodb,Node.js,Mongodb,假设我们收集了以下数据 { "_id" : ObjectId("59d1f9f366e0852538645961"), "agentId" : ObjectId("59d1f9f366e0852538645960"), "level" : 1, "totalCommission" : 0, "createDate" : "Mon Oct 02 2017 14:03:55 GMT+0530 (India Standard Time)", "work" : [ { "com

假设我们收集了以下数据

{
"_id" : ObjectId("59d1f9f366e0852538645961"),
"agentId" : ObjectId("59d1f9f366e0852538645960"),
"level" : 1,
"totalCommission" : 0,
"createDate" : "Mon Oct 02 2017 14:03:55 GMT+0530 (India Standard Time)",
"work" : [ 
    {
        "commission" : [],
        "project" : {},
        "enquiry" : {
            "createDate" : ISODate("2017-10-02T13:17:31.907Z"),
            "quarter" : {
                "_id" : ObjectId("59d21e2f5fa00a1734d9f847"),
                "type" : "4",
                "startMonth" : "October",
                "endMonth" : "December",
                "month" : "January",
                "DisbursementStartDate" : 15,
                "DisbursementEndDate" : 20,
                "__v" : 0
            },
            "enquiryId" : ObjectId("59d23c6bd5077719009c1d07")
        },
        "enquiryId" : ObjectId("59d23c6bd5077719009c1d07"),
        "createDate" : ISODate("2017-10-02T13:17:31.907Z"),
        "projectId" : ObjectId("59d245a27300631918cd7641")
    }
],
"__v" : 0
}

现在我想更新或推送“commission”数组中的对象,该数组位于 数组“工作”