i have a document as
(我有一个文件)
{ "_id" : ObjectId("5de2a0a2336a4c5adc3fc25c"), "image" : { "otherImages" : [ { "imageUrl" : "HL2370207N_1575195338958.jpg", "status" : true }, { "imageUrl" : "HL2370207N_1575195373805.jpg", "status" : true }, { "imageUrl" : "HL2370207N_1575195382992.jpg", "status" : true } ] } }
({“ _id”:ObjectId(“ 5de2a0a2336a4c5adc3fc25c”),“ image”:{“ otherImages”:[{“ imageUrl”:“ HL2370207N_1575195338958.jpg”,“ status”:true},{“ imageUrl”:“ HL2370207N_1575195373805.jpg” ,“ status”:true},{“ imageUrl”:“ HL2370207N_1575195382992.jpg”,“ status”:true}]}})
I have to delete an item of an otherImages array whose imageUrl is "HL2370207N_1575195382992.jpg" $pull cannot applied since it is under node image which is not an array.
(我必须删除其imageUrl为“ HL2370207N_1575195382992.jpg”的otherImages数组的一项,因为它位于不是数组的节点图像下,所以无法应用$ pull。)
please give any guidance . (请给我任何指导。)
i am new to the mongoDB (我是mongoDB的新手)
ask by Bharat Bhurtel translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…