How to export your MongoDB collections to CSV files

How to export your MongoDB collections to CSV files

For some reasons, we might want to export our data in our mongodb collections into csv files. Is it possible? Yes, it is. Mongodb provide a tools called mongoexport which can used to export your data to JSON or CSV files. Here is the usage example. mongoexport –db pricebook –collection product_specification –csv –fields “product_id,category_id,specs” -o…