I've been utilizing the LinkedIn JS API to retrieve a list of individuals. The data is returned in JSON format, and here is the callback function:
.result(function (result) {
profile = result.values[0];
// Perform an action with the first LinkedIn profile in the list...
});
The 'result' object returns something similar to this:
{"values":[{"id":"123456","firstName":"Person","lastName":"One"}, {"id":"123456","firstName":"Person","lastName":"Two"}, {"id":"123456","firstName":"Person","lastName":"Three"}],"_total":3}
Most documentation suggests using this syntax to access the nth item from the result:
var profile = result.values[n];
While this method works smoothly on most browsers, it throws an error in Internet Explorer:
Microsoft JScript runtime error: Object doesn't support this property or method
Any suggestions on how to work around this issue?
Appreciate any help in advance.