- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2022 11:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 12:30 AM
Hi,
you should be able to parse using JSON parser and get the values
Since you said it's confidential one we can just provide example from our side and rest part you need to take care of.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2022 11:51 PM
Hello Sabbani,
Please share your JSON Object data so that it is easy to understand. but suppose below is your Json Object
var fieldData = {"type":"string","label":"Assignment Group","value":"System Administrator","readonly":true,"mandatory":true};
then you can print as shown below:
for (var keys in fieldData) {
gs.print(keys + " : " + fieldData[keys]);
}
Output: (when executed in background script)
*** Script: type : string
*** Script: label : Assignment Group
*** Script: value : System Administrator
*** Script: readonly : true
*** Script: mandatory : true
Please mark my respsone as helpful/correct, if it answer your question.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 12:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 12:30 AM
Hi,
you should be able to parse using JSON parser and get the values
Since you said it's confidential one we can just provide example from our side and rest part you need to take care of.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 12:44 AM
Its already in json object format, then why again should we use json.parse()?
could you share the code for getting specified values to get printed from json object?