03-11-2018 20:38 - edited 03-11-2018 20:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
03-11-2018 20:38 - edited 03-11-2018 20:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Trying to parse return result from Select that includes TextImageRow render. Used JSON.stringify(evt) to produce return result. {"data":{"key":"emblem","newValue":"{\"selected\":[0],\"values\":[{\"id\":\"0\",\"image\":\"my-image-end.png\",\"name\":\"Fleet\"}]}"}} I am needing the Id from the values of the selected newValue.
Answered! Go to the Best Answer.

Accepted Solutions
03-19-2018 23:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-19-2018 23:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
newValue contains a JSON string, so you need to JSON.parse(evt.data.newValue) before trying to access its values.

03-19-2018 23:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-19-2018 23:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
newValue contains a JSON string, so you need to JSON.parse(evt.data.newValue) before trying to access its values.

03-20-2018 06:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
03-20-2018 06:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I ended up using the below after several attempts to get the id field value from:
{"data":{"key":"emblem","newValue":"{\"selected\":[0],\"values\":[{\"id\":\"0\",\"image\":\"my-image-end.png\",\"name\":\"Fleet\"}]}"}}
let data = JSON.parse(evt.data.newValue);
result = data['values'][0]['id'];

