Help, i can not import json from c9 to mongodb, I have a error in execution query

The console shows me an error and does not allow to execute a massive collection in a json.
-There are no users in the database
-This error from C9
rs0:PRIMARY> mongoimport --db test --collection SucursalesDoc --file example.json
2022-07-15T14:29:34.004+0000 E QUERY [js] SyntaxError: missing ; before statement @(shell):1:14

The query is:
mongoimport -d test -c SucursalesDoc /home/ec2-user/environmentexample.json

You have to run mongoimport from os prompt but you are running it from mongo prompt
Please exit from mongo and run it from os prompt

thanks, but I already did that option and I get the same error.
I thought it was for some connection with the ssl. but it still does not respond to any command

You mean same syntax error?
Show us a screenshot

This is a other way that i found on the internet. (Image 1)

and the first way was this.:

but i have an error.
My mail is:

Is mongo tools bin added to your path?
echo $path

or run mongoimport giving full path of the binary

1 Like