dari situs web mongoDb lihat "Setel Bidang dalam Dokumen Tersemat"
To specify a <field> in an embedded document or in an array, use dot notation.
For the document matching the criteria _id equal to 100, the following
operation updates the make field in the details document:
db.products.update(
{ _id: 100 },
{ $set: { "details.make": "zzz" } })
dalam kasus Anda
db.collection.update(
{_id:ObjectId("1")},
{ $set: { "occurrences.12": "3", "occurrences.17": "2" }})