0
我有子文檔的陣列像下面MongoDB的更新查詢基於所述值未設置特定陣列成員
/* record 1 */ { "_id" : "462044", "program" : [ { "name" : "Business Services" }, { "name" : "Homeland Security" }, { "title" : [ "associate" ], "name" : "Engineering" }, { "title" : [ "associate" ], "name" : "Computer Software" } ] } /* record 2 */ { "_id" : "462045", "program" : [ { "name" : "Business Services" }, { "name" : "Homeland Security" }, { "title" : [ "associate" ], "name" : "Engineering" }, { "title" : [ "associate" ], "name" : "Computer Software" } ] }
[我想刪除不具有「標題」的子構件陣列成員]
我怎麼能寫蒙戈更新查詢或函數的NodeJS得到以下文件集
/* record 1 */ { "_id" : "462044", "program" : [ { "title" : [ "associate" ], "name" : "Engineering" }, { "title" : [ "associate" ], "name" : "Computer Software" } ] } /* record 2 */ { "_id" : "462045", "program [ { "title" : [ "associate" ], "name" : "Engineering" }, { "title" : [ "associate" ], "name" : "Computer Software" } ] }