I am trying to pass the task-id response value from a verify-policy request in Postman as an environment variable. However, it appears that the output of "task-id" is not a valid json reference? Based on my testing it appears to be because of the dash "-" in the name "task-id". Does anyone know of another why to retrieve this value?
Here is my request:
I perform a verify-policy POST and get the following response:
"task-id" : "01234567-89ab-cdef-9966-b355dd0c80f1"
That request also has a test script to take the value of "task-id" and put it in my environment as variable "tk".
var jsonData = JSON.parse(responseBody);
//use task as variable
But executing this results in error, and the output from the Postman console indicates it is not defined, despite it shown in the response body.