How do i read a collection in mongodb?
-
Related:
How do i insert a document into a collection in mongodb?
How do i delete a document in a collection on mongodb?
How do i update a collection on mongodb?To read a collection we are effectively querying the collection. There is a method to help do this, called find.
MongoDB documentation: https://docs.mongodb.com/manual/reference/method/db.collection.find/
> db.softwarelist.find() { "_id" : ObjectId("5c24e11ba7354c80abcfb1f2"), "Company" : "MongoDB", "Type" : "Document Oriented Database", "Year" : 2009 }
© Lightnetics 2024