I am using mongoose in nodejs... I want to update deep array but cant update properly.. schema of this field is below...
case : [{
visit : [{
visit_no : Number,
treat : {
rep : [{name : String,img :{type : String,match : /^http:\/\//i}}]
}
}]}]
I had applied query with the help of https://jira.mongodb.org/browse/SERVER-831 is shown below...
update({"_id" : fields.id,"case._id" : fields.case,"case.visit._id" : fields.visit,"case.visit.treat.rep._id" : req.body.PInv},{$set : {"case.$0.visit.$1.treat.rep.$2.img" : req.body.img}})
But is will not showing error nor giving proper error.. i will require help for this problem