CRUD Operations in MongoDB
Insert Operation
Documents can be inserted using insertOne() and insertMany() methods.
db.<collectionname>.insertOne({field1:value1, field2: value2})
db.<collectionname>.insertMany([
{field1:value1, field2: value2},
{field1:value1,field2:value2}
])
...
learnings.hashnode.dev2 min read