patricklatella
Mega Sage

Here's my latest workflow script...I am receiving the json object correctly...how do I parse out the individual pieces?

Here's the log entry, so I know I'm getting the json correctly...just not successfully pulling them out.

returnedData is {"adDomain":"CORP","adGroup":"Okta-CORP-App-SAPBusinessObjectsCloud"} and adGroup is undefined and adDomain is undefined

and here's my workflow script creating this log:

var application = workflow.scratchpad.application;
var userDomain = workflow.scratchpad.user_domain;
var obj = new u_ActiveDirectoryGroup_lookup();
var returnedData = obj.GetUserADGroup(userDomain, application);
var adGroup = returnedData.adGroup; //guessing this is wrong
var adDomain = returnedData.adDomain; //guessing this is wrong
gs.info('returnedData is '+returnedData+' and adGroup is '+adGroup+' and adDomain is '+adDomain);