Using Mac OS and what I did on terminal.
$ set MONGO_USER=user_name
$ mongoimport -h ds040000.mlab.com:40000 -d race_resultsjson -c race_results -u username -p password –file directory_path/race_results.json
The results are:
connected to: ds040000.mlab.com:40000
Failed: error unmarshaling bytes on document #0: JSON decoder out of sync – data changing underfoot?
Imported 0 documents
However, when I encapsulate the complete array within a single object(see the attached screenshot below) importing the Json file works.
Link about how arrays work in mongodb