MongoDB returns/retrieves data from a collection by using the below method.
>db.createcollection("CollectionName") -- creates a collection ( properties are capped, autoIndexId, size and max)
>db.CollectionName.Insert("name" : "XYZ", "PhoneNum" : 1234567890, "MailID" : "xyz123@gmail.com")
>db.CollectionName.find()
Output { "name" : "XYZ", "PhoneNum" : 1234567890, "MailID" : "xyz123@gmail.com"}
Note: find() returns all documents in a collection if any filters are not specified