1
votes

Following is the json response that I am getting for one request.

"JobStages": [
            {
                "JobStageName": "Screening Phase",
                "JobStageID": 1,
                "Message": "",
                "JobStageIsRequired": true,
                "JobStageIsAnyRequired": false,
                "JobStageActivities": [
                    {
                        "ActivityName": "Phone Call",
                        "ActivityIsRequired": false,
                        "ActivityID": 1,
                        "IsActivityRejected": false
                    },

How can I extract value of ActivityIsRequired for Activity Phone Call using json extractor in Jmeter?
For example I want to extract value of ActivityIsRequired for ActivityName of JobStageID 1.

I am trying with this $..JobStages..JobStageActivities..[?(@.ActivityName == "Phone Call" && @.JobStageID == 1)].ActivityIsRequired

but it's not working

1

1 Answers

1
votes

I believe something like:

$.JobStages[?(@.JobStageID == 1)].JobStageActivities.[?(@.ActivityName == 'Phone Call')].ActivityIsRequired

should do the trick for you.

Demo:

enter image description here

More information: