mongo import json file command code example
Example 1: import csv into mongodb
mongoimport --type csv -d database -c collection --headerline --drop index2020.csv
Example 2: how to import a file from ones directory into mongodb
mongoimport --db test --collection inventory ^
--authenticationDatabase admin --username <user> --password <password> ^
--drop --file ~\downloads\inventory.crud.json