- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 05:24 PM
Hi I'm trying to get the value in a JSON response. Need some assistance. Im writing a script in flow designer.
Need the value from Out_ComboLock in the OutputArguments. Thanks in advance.
{
"@odata.context": "https://cloud.uipath.com/xxxxxx/xxxxx/orchestrator_/odata/$metadata#Jobs/$entity",
"Key": "6501ef0e-2bd9-48ef-a107-6xxxxxxxxx",
"StartTime": "2024-03-14T22:35:12.23Z",
"EndTime": "2024-03-14T22:35:18.38Z",
"State": "Successful",
"JobPriority": "Normal",
"SpecificPriorityValue": 45,
"ResourceOverwrites": null,
"Source": "Manual",
"SourceType": "Manual",
"BatchExecutionKey": "ed68f774-9b74-4592-xxxxxxxx",
"Info": "Job completed",
"CreationTime": "2024-03-14T22:35:11.673Z",
"StartingScheduleId": null,
"ReleaseName": "xxxxxxx",
"Type": "Unattended",
"InputArguments": "{\"In_Str_Customer_Name\":\"Wally woodse\",\"In_Str_Phone_Number\":\"+1 305-505-4494\",\"In_Str_SEID\":\"84848\",\"In_Str_AssignedPOD\":\"Yes\",\"In_Str_Device_Type\":\"Laptop\",\"In_Str_Lock_Type\":\"HP\",\"In_Str_SerialNumber\":\"17040100D\"}",
"OutputArguments": "{\"Out_ComboLock\":6789.0,\"Out_Str_SysID\":\"51deccc097c58610fdaxxxxx\"}",
"HostMachineName": "DESKTOP-6xxxx",
"HasMediaRecorded": false,
"HasVideoRecorded": false,
"PersistenceId": null,
"ResumeVersion": null,
"StopStrategy": null,
"RuntimeType": "Unattended",
"RequiresUserInteraction": true,
"ReleaseVersionId": 26xxxxxx,
"EntryPointPath": "Main.xaml",
"OrganizationUnitId": 52xxxxxx,
"OrganizationUnitFullyQualifiedName": null,
"Reference": "",
"ProcessType": "Process",
"ProfilingOptions": null,
"ResumeOnSameContext": false,
"LocalSystemAccount": "ELECT",
"OrchestratorUserIdentity": "xxxxxxx",
"RemoteControlAccess": "None",
"StartingTriggerId": null,
"MaxExpectedRunningTimeSeconds": null,
"ServerlessJobType": null,
"ResumeTime": null,
"LastModificationTime": "2024-03-14T22:35:18.38Z",
"ProjectKey": "f3648be0-8e7c-4xxxxxxxxx",
"ParentOperationId": null,
"Id": 332xxxxxxxx
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 10:02 PM
Hi @ASOFred
Please try this-
var jsonObject = JSON.parse(jsonResponse);
var outputArguments = JSON.parse(jsonObject.OutputArguments);
var outComboLock = outputArguments.Out_ComboLock;
gs.info(outComboLock);
Regards,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 10:02 PM
Hi @ASOFred
Please try this-
var jsonObject = JSON.parse(jsonResponse);
var outputArguments = JSON.parse(jsonObject.OutputArguments);
var outComboLock = outputArguments.Out_ComboLock;
gs.info(outComboLock);
Regards,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 01:52 AM - edited 03-15-2024 01:53 AM
Hi @ASOFred,
Since you are using the Flow designer, have you considered creating a custom action for parsing JSON?
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2024 03:24 PM
Close it. Turned out to be.
var jobDataObject = JSON.parse(jobResponseData);
var outputArguments = JSON.parse(jobDataObject.OutputArguments);
var outComboLock = outputArguments["Out_ComboLock"];
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 06:17 AM
Hi @ASOFred
Thanks for confirmation! Can you mark my answer helpful and correct for the interest of community, please.
Regards,
Amit