Export MongoDB to CSV

Refer : https://stackoverflow.com/questions/28733692/how-to-export-json-from-mongodb-using-robo-3t
Online Json Formatter: https://www.convertcsv.com/json-to-csv.htm

In Robo3T

db.getCollection('voyage').find({}).toArray()

The click "Copy JSON in results.

You'll have to remove the wonky special characters, formatter cannot deal with the parentheses

"_id" : ObjectId("6393952a13b1ad7a8935f7a4"),

Needs to be

"_id" : "6393952a13b1ad7a8935f7a4",

Leave a Reply