Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
ianf-mongodb committed Nov 20, 2023
1 parent 985017b commit 62977fd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions source/documents/modify-multiple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ modal displays.
$set: { "tomatoes.viewer.rating" : 5 }
}


The following example updates the ``tomatoes.viewer.numReviews`` and
``tomatoes.viewer.meter`` fields with the Compass
:guilabel:`Update Documents` modal.
Expand All @@ -108,13 +109,21 @@ statement:
$set: { "tomatoes.viewer.meter" : 99 }
}

The :guilabel:`Preview` text box populates with sample documents.
This syntax:

- Increments the ``tomatoes.viewer.numReviews`` field by ``1``.
- Sets the ``tomatoes.viewer.meter`` field to ``99``.

Click the :icon-fa5:`chevron-right` arrow next to ``tomatoes``
The :guilabel:`Preview` text box populates with sample documents.
To preview the updates to the documents, click the
:icon-fa5:`chevron-right` arrow next to ``tomatoes``
and then click the :icon-fa5:`chevron-right` arrow next to
:guilabel:`rating` to preview the updated :guilabel:`numReviews`
and :guilabel:`meter` fields.

Click the :guilabel:`Update Documents` button to update the collection
data.

Learn More
----------

Expand Down

0 comments on commit 62977fd

Please sign in to comment.