title: Nodejs getting keys from JSON
body: <p>I am reading a json file in nodejs and want to find a specific key in the json object before doing things with it:</p>
  
  <pre><code>fs.readFile('./output.json', 'utf8', function(err, data) {
          if (err) throw err;
          console.log(Object.keys(data));
  
  });
  </code></pre>
  
  <p>Problem is, it returns an array of numbers as strings:</p>
  
  <pre><code>[ '0',
    '1',
    '2',
    '3',
    '4'
    ... ]
  </code></pre>
  
  <p>When my json file has text like this. Why is this happening? </p>
  
  <pre><code>[{
      "id": "vdhbsasqzqnbx2od",
      "message": "On Sun, Jan 1, 2012 at 8:17 AM, Alan Stern &lt;ste...@rowland.harvard.edu&gt; wrote:As Linus pointed out, the real problem here 
  }, { ...
  }]
  </code></pre>