I am trying to parse JSON data returned in a Postman test for the first time but the complexity of my payload is causing parsing issues: how can I get to the "stage-guid" field in
{
"Workflow": {
"com.mycom.MyWorkflow": {
"id": 10,
"stages": [
{
"com.mycom.MyStage": {
"id": 22,
"stage-guid": "00000000-0000-1111-1111-123456789012",
The following gets me to the Workflow object, but I have not figured out how to access inside the com.mycom.MyWorkflow object.
var responseInJson = pm.response.json();
var workFlowData = responseInJson.Workflow;
console.log("in workflow", workFlowData);
I have tried workflowData.id, workflowData.object.id, workflowData.Object.id, workflowData[pm.variables.get("stage-guid")] but the test case never proceeds beyond these (incorrect) access attempts.