Hi All
I've successfully retrieved JSON data from an authenticated (OAuth2) source.
I'm using a RestResource JavaScript page in an attempt to parse/format/display....
When I simply display the JSON using 'print (_REST.response.body);' everything is good - I get JSON on screen.
However, using eval (as suggested in the manual) or JSON.parse doesn't work. The following code:
var status = eval('(' + _REST.response.body + ')');
print (status.length);
print (status);
displays: undefined [object Object].
Using JSON.parse is worse - everyting after the call breaks (nothing printed).
So I can't parse the JSON and therefore can't start to do anything with it.
Any idea what's going wrong here?
thanks
mark