0

I have a large number of JSON-files that I need to import to my Mongo database, I have also defined a schema in Mongoose, with the exact same format as my JSON-files.

Is there any way to use the terminal to import all the files to my database?

Community
  • 1
  • 1
martin
  • 1,894
  • 4
  • 37
  • 69
  • 1
    Look at the docs especially the [**mongoimport**](http://docs.mongodb.org/manual/reference/program/mongoimport/) command. – chridam Jun 24 '15 at 15:19

1 Answers1

0
This is straight from the docs.  

mongoimport --db users --collection contacts --file contacts.json

Also look at this thread as another person ran into some issues

Mongoimport of json file

Community
  • 1
  • 1
Winnemucca
  • 3,309
  • 11
  • 37
  • 66