Skip to content

Instantly share code, notes, and snippets.

@justinriggio
Created October 15, 2013 22:35
Show Gist options
  • Save justinriggio/6999733 to your computer and use it in GitHub Desktop.
Save justinriggio/6999733 to your computer and use it in GitHub Desktop.
Pretty print mongo collection
$ mongo --quiet dbname --eval 'printjson(db.collection.find().toArray())' > output.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment