Skip to content

Instantly share code, notes, and snippets.

@Irene-24
Created November 20, 2020 15:16
Show Gist options
  • Save Irene-24/eb3b1482f1b1a6a97f5d48be0c8e5172 to your computer and use it in GitHub Desktop.
Save Irene-24/eb3b1482f1b1a6a97f5d48be0c8e5172 to your computer and use it in GitHub Desktop.
Importing json to mongodb
Endure you have the mongodb tools, else mongoimport will fail woefully
mongoimport --uri "[url to mongo db server - use the srv one]" --db [db name] --collection [collection name] --type json --file "[path to json file]" --jsonArray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment