title: How to dump a collection to json file using pymongo
body: <p>I am trying to dump a collection to .json file but after looking in pymongo tutorial I can not find any thing that relates to it.</p>
  
  <p>Tutorial link: <a href="https://api.mongodb.com/python/current/tutorial.html" rel="noreferrer">https://api.mongodb.com/python/current/tutorial.html</a></p>