Trying to figure out the JavaScript syntax for handling JSON feed returned by a REST service. Suppose a random REST service (e.g. http://random.service/directory) is returning the following feed:
{
'firstName': 'John',
'lastName': 'Smith',
'address': {
'streetAddress': '21 2nd Street',
'city': 'New York'
}
}
and that I have a JSON parsing JS function (to parse the above feed) like:
function parseRESTFeed(json) {
...
}
How do I bridge the REST call of "http://random.service/hello" to parseRESTFeed(json) via JS?
Much Thanks!