Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的收藏结构是:
col1 = {'class':'12', 'roll':[1, 2, 3, 4]}
现在,我想update收藏col1到
update
col1
col1 = {'class':'12', 'roll':[1, 2, 3, 4, 5]}
我在这里添加了另一个卷号,如何在 pymongo 中更新此集合。
db.col1.update( { class : 12}, { $push : { roll : 5 } } )