@@ -18,24 +18,66 @@ Insert Documents
1818 :backlinks: none
1919 :depth: 1
2020
21- ----------
21+ .. include:: /includes/language-selector-instructions.rst
2222
23- .. |arrow| unicode :: U+27A4
23+ .. tabs-selector :: drivers
2424
25- |arrow| Use the **Select your language** drop-down menu in the
26- upper-right to set the language of the examples on this page.
25+ This page provides examples of insert operations in MongoDB.
2726
28- ----------
27+ You can insert documents in MongoDB by using the following
28+ methods:
2929
30- .. tabs-selector :: drivers
30+ .. |atlas-ref| replace :: :ref:`insert-documents-atlas`
3131
32- This page provides examples of insert operations in MongoDB.
32+ .. include:: /includes/fact-methods.rst
3333
3434.. note:: Creating a Collection
3535
3636 If the collection does not currently exist, insert operations will
3737 create the collection.
3838
39+ .. _insert-documents-atlas:
40+
41+ Insert Documents in the {+atlas+} UI
42+ -------------------------------------------
43+
44+ To insert a document in the {+atlas+} UI, complete the following steps.
45+ To learn more about working with documents in the {+atlas+} UI, see
46+ :atlas:`Create, View, Update, and Delete Documents
47+ </atlas-ui/documents>`.
48+
49+ .. procedure::
50+ :style: normal
51+
52+ .. step:: Navigate to the collection
53+
54+ a. In the {+atlas+} UI, click :guilabel:`Database` in the sidebar.
55+ #. For the database deployment to which you want to add documents,
56+ click :guilabel:`Browse Collections`.
57+ #. In the left navigation pane, select the database.
58+ #. In the left navigation pane, select the collection.
59+
60+ .. step:: Add the documents
61+
62+ a. Click :guilabel:`Insert Document`.
63+ #. Click the :guilabel:`{}` icon, which opens the JSON view.
64+ #. Paste the document array into the text entry field. For
65+ example, the following entry creates four documents, each of
66+ which contain three fields:
67+
68+ .. code-block::
69+
70+ [
71+ { "prodId": 100, "price": 20, "quantity": 125 },
72+ { "prodId": 101, "price": 10, "quantity": 234 },
73+ { "prodId": 102, "price": 15, "quantity": 432 },
74+ { "prodId": 103, "price": 17, "quantity": 320 }
75+ ]
76+
77+ .. step:: Click Insert.
78+
79+ {+atlas+} adds the documents to the collection.
80+
3981.. _write-op-insertOne:
4082
4183Insert a Single Document
0 commit comments