How to get all the documents from MongoDB

Getting entire data of a MongoDB collection is very simple. For example the following documents are in our Users collection… and we can get all the documents from our database using Users.find({}), this will…

How to get only required data fields from MongoDB

So, you have noticed that we can exclude any field by giving it a value `false` or zero `0`. Now, think, what the code will be if we want all the fields to send but not the password! Easy? yes, here is the code…

Get data with MongoDB findById()

Now, if we need only the `username`, or only `firstName`, or only `username` and `email`, or all the data fields but not the `password`, or whatever you want…

Install MongoDB on Windows

Install MongoDB Community Server on your local machine. One Click Download- MongoDB, or (1) visit https://www.mongodb.com/try/download/community?tck=docs_server, (2) Select Version, Platform (Windows), and Package (msi), (3) Click on Download, (4) Run the installer…

About MongoDB

MongoDB is the Leading NoSQL database. It’s a very populare document based database platform with the scalability and flexibility built for modern application developers and for the cloud era…