I used mongoimport -d test -c BB --file=bb.json
also I tried mongoimport -d test -c BB --jsonArray --file=bb.json
they only insert it as one record instead of multiple records ( 2900 approx )
I know that in MongoDB the data should be in key:value pair and this data is in list for but with metadata as well.
Can I import data in this form itself without converting it into key : value pairs ?
Thanks
Here is the Data or info from input file bb.json which I am trying to import
Start of DATA File { "data": [ [ "1", "Andaman and Nicobar Islands", "NA", "Port Blair", "G.B Pant Hospital", "Atlanta Point", "744104", "03192 230628", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "[=12]12", "[=93]93" ], [ "2", "Andaman and Nicobar Islands", "NA", "Port Blair", "I.N.H.S. Dhanvantri", "Mii Bay", "744103", "03192 248759", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA" ], ..... # RECORDS [ "2946", "West Bengal", "NA", "Murshidabad", "Lalbagh S.D. Hospital Blood Bank", "P.O. Lalbagh", "742149", "03482 270247", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "[=24]24", "[=88]88" ] ], "fields": [ { "id": "a", "label": "id", "type": "string" }, { "id": "b", "label": "state", "type": "string" }, { "id": "c", "label": "city", "type": "string" }, { "id": "d", "label": "district", "type": "string" }, { "id": "e", "label": "h_name", "type": "string" }, { "id": "f", "label": "address", "type": "string" }, { "id": "g", "label": "pincode", "type": "string" }, { "id": "h", "label": "contact", "type": "string" }, { "id": "i", "label": "helpline", "type": "string" }, { "id": "j", "label": "fax", "type": "string" }, { "id": "k", "label": "category", "type": "string" }, { "id": "l", "label": "website", "type": "string" }, { "id": "m", "label": "email", "type": "string" }, { "id": "n", "label": "blood_component", "type": "string" }, { "id": "o", "label": "blood_group", "type": "string" }, { "id": "p", "label": "service_time", "type": "string" }, { "id": "q", "label": "latitude", "type": "string" }, { "id": "r", "label": "longitude", "type": "string" } ] }
END of DATA File -----------------------------------------------------------------------
