title: unable to parse the JSON returned by AWS.EC2.describeInstances() method in nodejs API
body: <p>This is my code </p>
  
  <pre><code>var AWS = require('aws-sdk');
  AWS.config.region = 'ap-southeast-1';
  
  var uuid = require('node-uuid');
  ec2 = new AWS.EC2({apiVersion: 'latest'});
  
  
  AWS.config.update({accessKeyId: xxxxxxxx, secretAccessKey: yyyyyyyyyyy});
  AWS.config.update({region: 'zzzzzzzzzzzzzz'});
  
  var util = require('util');
  var opsworks = new AWS.OpsWorks();
  var cloudformation = new AWS.CloudFormation();
  var cloudwatch = new AWS.CloudWatch();
  
  function listInstances(callback){
  new AWS.EC2().describeInstances(function(error, data) {
      if (error) {
          callback(error);
      } else {
          callback(util.inspect(data, {depth: null})); //this returns a full fledged JSON response on the console
  
  }
  
  });
  }
  
  //Test above methods
  listInstances(callback);
  
  
  function callback(data){
    console.log(data);
  }
  </code></pre>
  
  <p>I tried parsing the JSON response by replacing the line </p>
  
  <pre><code>callback(util.inspect(data, {depth: null})); 
  </code></pre>
  
  <p>with </p>
  
  <pre><code>JSON.parse(data);
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>{ [SyntaxError: Unexpected token o] statusCode: 200, retryable: false }
  { [200: null]
  message: null,
  code: 200,
  time: Tue Jul 22 2014 22:59:42 GMT+0530 (India Standard Time),
  statusCode: 200,
  retryable: false }
  </code></pre>
  
  <p>i tried using eval() to parse it and i got the following error</p>
  
  <pre><code>[SyntaxError: Unexpected identifier]
  </code></pre>
  
  <p>Am I doing anything wrong, should I be parsing the JSON response using any other logic?</p>
  
  <p>Please excuse my ignorance if any since I am new to both node.js and AWS</p>