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]}
ここに別のロール番号を追加しました。ピモンゴでこのコレクションを更新する方法。
db.col1.update( { class : 12}, { $push : { roll : 5 } } )