- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 08:37 AM
Hi All,
In REST integration, we are getting Response.getBody() with lots of fields and values respective to it. However, i would like to get some specific value from that Response.Could anyone please let me know how to get that? I tried with decode and Parse but still in log its displaying undefined.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 09:05 AM
Result does not appear to be an array. I'm reaching this as:
gs.log('Number=' + jsonObject.result.number);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 08:39 AM
Can you share the code and a sample of the JSON object you are getting? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 08:52 AM
Hi Chuck,
Thanks for quick reply.
Below is the line of code:-
var response = r.execute();
//var responseBody = response.getBody();
var jsonBody = response.getBody();
var jsonObject = JSON.parse(jsonBody);
gs.log('REST data parsed: ' + jsonObject.number );
On log, I am getting:-
REST data parsed: undefined

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 08:56 AM
Can you include a bit of that JSON string you get from the respose.getBody() call?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 09:02 AM
Here its Chuck:-
Reached here :{"result":{"u_update_set_name":"","skills":"initial","upon_approval":"proceed","location":"","expected_start":"","u_technical_service":"","close_notes":"closed successfully","service_offering":"","u_total_hours_worked":"2","u_project":"abc","additional_assignee_list":"test","impact":"3","urgency":"3",