Home > Database > Mysql Tutorial > How to import json data into MongoDB

How to import json data into MongoDB

不言
Release: 2018-10-10 11:03:28
forward
5924 people have browsed it

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

How to import json data into MongoDB

Enter the import command in the terminal:

mongoimport --db dbName --collection collectionName --file filePath
Copy after login

Actual specific command:

mongoimport --db mall --collection userData --file /Users/yeo/Desktop/userdata.json
Copy after login

How to import json data into MongoDB

Go to the database again to see if the import is successful

How to import json data into MongoDB

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!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
mongodb start
From 1970-01-01 08:00:00
0
0
0
linux - ubuntu14 error installing mongodb
From 1970-01-01 08:00:00
0
0
0
Use of symfony2 mongodb
From 1970-01-01 08:00:00
0
0
0
mongodb _id rename
From 1970-01-01 08:00:00
0
0
0
Parameter understanding of mongodb
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template