title: JSON Stream Npm modules queries
body: <p>I am working with a big JSON data and used Json stream module in my Nodejs to get the values.</p>
  
  <p>This is my JSON Structure, I have to parse and collected 4 or 5 values from both metadata and status elements.
  I have 5 elements in the JSON array.</p>
  
  <p><a href="https://i.stack.imgur.com/Lof6S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lof6S.png" alt="enter image description here"></a></p>
  
  <pre><code>request({url:'ssss',verify:'False',headers:{'Authorization':'Bearer zzzz','Accept':'application/json','User-Agent':'zzz'}})
    .pipe(JSONStream.parse('items'))
    .pipe(es.mapSync(function (data) {
      console.log("Data "+data);
      console.log("Stringify "+ JSON.stringify(data));
     var specificValue = JSON.stringify(data);
      console.log("Specific Value"+ specificValue[0].metadata.labels.app);
      console.log("Parse and Stringify "+ JSON.parse(JSON.stringify(data)));
    })) ;
  </code></pre>
  
  <p>In <code>console.log Data</code> i can see 5 objects as <code>[object Object],[object Object],[object Object],[object Object],[object Object]</code></p>
  
  <p>In <code>console.log Stringify</code> I can only see a chunk (1 element) of JSON data, I do not see all 5 elements.</p>
  
  <p>In <code>console.log Specific Value</code> I see <code>TypeError: Cannot read property 'labels' of undefined</code>. The label element is there displayed log and the query <code>specificValue[0].metadata.labels.app</code> is working other JSONPath testers.</p>
  
  <p>How can I parse and get the specific value even after using JSON Stream module?</p>
  
  <p>Ideally I would like to do a <code>for</code> loop and get all the values.</p>
  
  <p>In <code>console.log Parse and Stringify</code> I get  <code>[object Object],[object Object],[object Object],[object Object],[object Object]</code></p>