The content of this article is about the method of importing json data into MongoDB. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
json data
Enter the import command in the terminal:
mongoimport --db dbName --collection collectionName --file filePath
Actual specific command:
mongoimport --db mall --collection userData --file /Users/yeo/Desktop/userdata.json
Go to the database again to see if the import is successful
The import is successful.
The above is the detailed content of How to import json data into MongoDB. For more information, please follow other related articles on the PHP Chinese website!