Last active
September 7, 2017 17:37
-
-
Save swateek/ee0e14b917b7b91ff108a0f785688111 to your computer and use it in GitHub Desktop.
Export Data from MongoDB to .csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// export data to csv | |
print("ap_mac,tags"); | |
db.managedaps.find({}).forEach(function(ap){ | |
print(ap.mac+","+ap.tags); | |
}); | |
// mongo dbname filename.js > out.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment