Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 330 Bytes

example-push-each.rst

File metadata and controls

10 lines (8 loc) · 330 Bytes

The following example appends each element of [ 90, 92, 85 ] to the scores array for the document where the name field equals joe:

db.students.update(
                    { name: "joe" },
                    { $push: { scores: { $each: [ 90, 92, 85 ] } } }
                  )