title: JavaScript/Node.js JSON.parse() Undefined
body: <p>I am receiving the error:</p>
  
  <pre><code>undefined:1
  '{"completed_in":0.078,"max_id":333655176038719488,"max_id_str":"3336551760387
  ^
  SyntaxError: Unexpected token '
      at Object.parse (native)
      at /home/tweets/10seconds.js:25:25
      at passBackControl (/home/tweets/node_modules/oauth/lib/oauth.js:367:11)
      at IncomingMessage.&lt;anonymous&gt; (/home/tweets/node_modules/oauth/lib/oauth.js:386:9)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:895:16
      at process._tickCallback (node.js:415:13)
  </code></pre>
  
  <p>When parsing Twitter API JSON from the Search API.</p>
  
  <p>The code I am using the parse this JSON is:</p>
  
  <pre><code>MongoClient.connect("mongodb://localhost:27017/db", function(err, db) {
  
   if(err) { return console.dir(err); }
    var collection = db.collection("tweets");
  
      while(run &lt; 200){
  
          oa.get("http://search.twitter.com/search.json?q=morning&amp;rpp=100&amp;include_entities=true&amp;result_type=mixed", access_token, access_token_secret, function(error, data) {
              var theTweets = JSON.parse(sys.inspect(data));
  
             collection.insert(theTweets, {w:1}, function(err, result) {});
             console.log(run);
          });
      run = run + 1;
      }
  
  });
  </code></pre>
  
  <p>What could cause this?</p>