mongodb - Inserting JSON document into mongo error -


i'm trying insert twds1e1.json file mongodb through command prompt:

db.collections.insert( twds1e1.json ) 

but getting error:

twds1e1.json not defined.

mongo not thing, doing wrong here?

in command prompt directory path path mongoimport.exe available type commands

for normal json

mongoimport  -d test -c docs --file example2.json 

for array type json

mongoimport --jsonarray -d test -c docs --file example2.json 

please see docs more information


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -