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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.