I have the following problem. I need to extract the File ID from the following output of a playbook:
"result_task_id": {
"changed": false,
"dnac_response": {
"response": {
"endTime": 1674734268584,
"id": "12393650-c412-4f09-bcc6-25fe24b8b0a9",
"instanceTenantId": "6305975890949b5614356b66",
"isError": false,
"lastUpdate": 1674734268584,
"progress": "{\"fileId\":\"1ce07c2a-c3f9-46f3-b216-713d043871d6\"}",
"rootId": "12393650-c412-4f09-bcc6-25fe24b8b0a9",
"serviceType": "Command Runner Service",
"startTime": 1674734268134,
"username": "admin",
"version": 1674734268584
},
"version": "1.0"
},
"failed": false,
"result": ""
}
}
Selecting the right field result_task_id.dnac_response.response.progress
results in this output:
{\"fileId\":\"1ce07c2a-c3f9-46f3-b216-713d043871d6\"}
I just need the ID 1ce07c2a-c3f9-46f3-b216-713d043871d6
. The ID itself can differ from run to run but the position will be the same.
Is there a way to use the select('match'...)
in order to filter it out?
I need characters 14 until 49. I was not able to find the right regex.
Thanks for the help