Hello guys I'm trying to import JSON file to my collection in mongodb database but keeps give me an error. how to import this json file? I tried using mongodb compass and mongoshell give me this error
E QUERY [js] uncaught exception: SyntaxError: unexpected token: identifier :
@(shell):1:14
This is the file: https://github.com/pedox/indonesia-mongo/blob/master/indonesia.json
My mongoimport command:
mongoimport --jsonArray --db DB_Pro --collection indonesia --file:C:\Users\<usernamePC>\Downloads\db indonesia\Indonesia-mongo\indonesia.json
mongoimportto import JSON data in to a MongoDB collection. It is run from the operating system command line / terminal / command prompt. - prasad_2020-07-02T11:23:47.375+0700 E QUERY [js] uncaught exception: SyntaxError: unexpected token: identifier : @(shell):1:14- flyingduck92--file:C:\Users\...instead try this:--file="C:\Users\..."- prasad_