How to Split a Value that is in a Multi line Text field into new lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2017 12:00 PM
Hi,
I am fetching a value through a webservice ('parametes') which is "{"FirstName":"Rob","LastName":"Civitello","ID":"XXXXXX","Location":"XXXXXX"}". I want to split this value and display it in Mutli Line text field as follows
FirstName:Rob
LastName:Civitello
ID:XXXXXXX
Location:XXXXXXXXX.
Can some Please help me in spliting these and dispalying as mentioned.
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2017 12:09 PM
Please use \n to get the string in next line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2017 12:16 PM
I am fetching that value a single string and i want to split by , and then remove the Quotes and then display as show.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2017 12:32 PM
Please check if this helps.
var obj = JSON.parse('{"FirstName":"Rob", "LastName":"Civitello", "ID":"XXXXXX", "Location":"XXXXXX"}');
gs.print('FirstName' + ':' +obj.FirstName);
gs.print('LastName' + ':' +obj.LastName);
gs.print('ID' + ':' +obj.ID);
gs.print('Location' + ':' +obj.Location);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2017 12:37 PM
Yes this is Working fine, but one more questions.
Can we keep this value in a Multi lie text like what we are getting.
and these values will be dynamically changing we might not get the Same name all the time.