title: Parse large JSON file in Nodejs and handle each object independently
body: <p>I need to read a large JSON file (around 630MB) in Nodejs and insert each object to MongoDB. </p>
  
  <p>I've read the answer here:<a href="https://stackoverflow.com/questions/11874096/parse-large-json-file-in-nodejs">Parse large JSON file in Nodejs</a>.</p>
  
  <p>However, answers there are handling the JSON file line by line, instead of handling it object by object. Thus, I still don't know how to get an object from this file and operate it.</p>
  
  <p>I have about 100,000 this kind of objects in my JSON file.</p>
  
  <p>Data Format:</p>
  
  <pre><code>[
    {
      "id": "0000000",
      "name": "Donna Blak",
      "livingSuburb": "Tingalpa",
      "age": 53,
      "nearestHospital": "Royal Children's Hospital",
      "treatments": {
          "19890803": {
              "medicine": "Stomach flu B",
              "disease": "Stomach flu"
          },
          "19740112": {
              "medicine": "Progeria C",
              "disease": "Progeria"
          },
          "19830206": {
              "medicine": "Poliomyelitis B",
              "disease": "Poliomyelitis"
          }
      },
      "class": "patient"
    },
   ...
  ]
  </code></pre>
  
  <p>Cheers,</p>
  
  <p>Alex</p>