How to update deep array

Skip to first unread message

Santosh Maheswari

Jul 6, 2016, 12:44:04 PM7/6/16
to mongoose-users

I am using mongoose in nodejs...
I want to update deep array but cant update properly..
schema of this field is below...
case_detail : [{
visit_detail : [{
visit_no : Number,
treatment : { 
report : [{name : String,img :{type : 
String,match : /^http:\/\//i}}]

I had applied query with the help of is shown below...


{"_id" :,"case_detail._id" :,"case_detail.visit_detail._id" : fields.visit,"" : req.body.PInv}

,{$set : {"case_detail.$0.visit_detail.$$2.img" : req.body.img

But is will not showing error nor giving proper error..
i will require help for this problem...
Hope for positive reply..

Sergey Lyubka

Jul 6, 2016, 12:47:53 PM7/6/16
to mongoose-users
Wrong list

You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

Reply all
Reply to author
0 new messages