index/ingest very large json file to database with node.js
<p>I inherited a huge json file that I'm trying to index into elasticsearch (not really a database but don't get hung on es it should apply to most db ingest). I'm using node to do the ingest. I've tried streams and async but I'm stumped I have no frame for approaching this problem - without memory overflows and the like.</p>

<p>I can't post a 1 to 1 but it's effectively a multidimensional object that looks something like:</p>

<pre><code>[ 
   { 
     document: {
        type: 1,
        type2: 2,
        type3: {...}
    },
    {...}
]
</code></pre>

<p>I just need to ingest the docs, I can use the elasticsearch client and process them in bulk.  I need to slow down the stream, parse, and chunk.</p>

<p>Totally stuck... Help stackoverflow it's Friday I want to go home ; ).</p>