Export a json file from a MongoDB Collection

IT did not authorized me to download MongoDB Compass fast enough, so I decided to use the tools available to export a collection. Node.js was authorized, installed and ready for the rescue.

I slightly modified a stackoverflow answer and I was in business really quick.

I put some effort into documenting the parts and pieces of the MongoDB string connection to be aware of the fields/variables that I need to update next time.

Check the repo out...

GitHub - summonidea/mongodb-export-to-json: Using node.js and mongoose package to read a mongo atlas collection and export it to a json file
Using node.js and mongoose package to read a mongo atlas collection and export it to a json file - GitHub - summonidea/mongodb-export-to-json: Using node.js and mongoose package to read a mongo atl...

Reference

https://stackoverflow.com/questions/5794834/how-to-access-a-preexisting-collection-with-mongoose