My collection structure:
col1 = {'class':'12', 'roll':[1, 2, 3, 4]}
Now i want a updatecollection col1in
update
col1
col1 = {'class':'12', 'roll':[1, 2, 3, 4, 5]}
I added another roll number here, How to update this collection in pymongo.
db.col1.update( { class : 12}, { $push : { roll : 5 } } )
Source: https://habr.com/ru/post/1770480/More articles:Problem with AdWhirlLayout - androidUsing custom versions of GNU / GPL web applications as a commercial subscription model - web-applicationsApache user privileges on Centos - linuxCrazy SQLite and cursor leak on autocomplete - androidHttpContext.Current.User.Identity.Name with and without www - asp.netHow can I determine which version of JavaDB / Derby I am using? - jarHow can I dynamically set the image size ratio based on the returned image in raphael? - javascriptAccessing objects in semantic_fieds_for loop / formtastic - ruby-on-railsLua Domain Configuration Configuration - luawrong protocol for crossdomain.xml in flex application - flexAll Articles