To get all the Documents of the Collection use find() method. The find() method takes a query object as a parameter if we want to find all documents then pass none in the find() method. To include the field in the result the value of the parameter passed should be 1, if the value is 0 then it will be excluded from the result.
Note: If we pass no parameter in find() method .it works like select * in MYSQL .
Let’s suppose the database looks like this
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.