Mongo db update on array object -


{       "_id" : objectid("4faaba123412d654fe83hg876"),       "user_id" : 123456,       "total" : 100,       "items" : [               { "item_name" : "my_item_one",                  "price" : 20,                "veriety":              [{               color:"red",               make:"plastic"                },{color:"green",               make:"metal"          }]               },               {                       "item_name" : "my_item_two",                       "price" : 50,           "veriety":[           {               color:"red",               make:"plastic"           }           ]               },               {                       "item_name" : "my_item_three",                       "price" : 30,           "veriety":[               {               color:"red",               make:"plastic"              }            ]               }       ]   }   

in case want update color price 30 , "total" 100, ......how can it?


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -