Creating Documents
📌 insertOne()
Click the create collection button. Then click the insert document button.
_id is the unique id for every document in mongodb
Using mongo shell:
📌 insertMany()
Using mongo shell:
Insert many does an ordered insert by default, this means that as soon as this finds an error it will stop inserting documents.
To change the behavior of ordered insert, add after the array a document:
Last updated
Was this helpful?