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.
var req = http.request(options, function(res){
    res.setEncoding('utf8');
    res.on('data', function(data){
        console.log(data);
    });
});
The response is ...
shsMSNBCTicker.loadGamesData({
"sport": "NBA", 
"period": "20140426", 
"games": [""]
});
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."
 
    