title: API is returning function
body: <p>I am trying to get scores from an API in node.js and I get a response that seems like a function. I am not exactly sure how to get the JSON data out of this function.</p>
  
  <pre><code>var req = http.request(options, function(res){
      res.setEncoding('utf8');
      res.on('data', function(data){
          console.log(data);
      });
  });
  </code></pre>
  
  <p>The response is ...</p>
  
  <pre><code>shsMSNBCTicker.loadGamesData({
  "sport": "NBA", 
  "period": "20140426", 
  "games": [""]
  });
  </code></pre>
  
  <p>Within "games" is a bunch of data but that is unimportant and would take up way too much space. For this example, let's just say I am trying to get "sport"; which would return "NBA." </p>