我想根据条件“status”:“Ready for Review”从 HTTP 采样器的以下 JSON 响应正文获取“currentApproversStr:”的值,并传递给以下 HTTP 采样器。
我尝试了以下但它不工作
- 创建变量的名称:currentApproversStr
- JSON 路径表达式:$.[?((@.currentApproversStr == "Validation, Civa" || @.currentApproversStr == "Validation, Darla" || @.currentApproversStr == "Validation, Bittl" || @.currentApproversStr = = "验证,查" || @.currentApproversStr == "验证,巴内特") && @.status== "准备审核")]
- 比赛编号:-1 或 1
但 Dummy Sampler 会返回结果
我们不能保证具有“状态”的“timecardId”块的顺序:“Ready for Review”,即有时排在第二位,有时排在最后。这是第二个街区。所以不确定匹配号:我应该给什么
[
{
"timecardId": 170803,
"entryHeaderId": "db9341a9-32e8-4d45-a858-a88b75a42cef",
"startsOn": "2021-10-24T00:00:00",
"endsOn": "2021-10-30T00:00:00",
"worksightStatus": "SignedOff",
"projectId": 1977,
"userId": 60874,
"status": "Submitted for Approval",
"batchId": 39814,
"emergencyType": "",
"htgDealMemoId": "0d0ff42b-5c4b-4695-b527-34dfc64585e5",
"unionId": "1c77c660-28fc-4e40-b557-132f3da39597",
"currentApproversStr": "Perf, PA",
"commentStr": "",
"commentUserName": "",
"commentCreatedAt": "1900-01-01T00:00:00",
"occupationCode": "TECHNICIAN",
"activeApprovalFlowId": 166669,
"isAllowanceOnly": false,
"departmentId": null,
"datePosted": null
},
{
"timecardId": 170807,
"entryHeaderId": "c9809446-b01f-4f42-add6-9b441c3d0114",
"startsOn": "2021-10-17T00:00:00",
"endsOn": "2021-10-23T00:00:00",
"worksightStatus": "Outstanding",
"projectId": 1977,
"userId": 60874,
"status": "Ready for Review",
"batchId": 39815,
"emergencyType": "",
"htgDealMemoId": "0d0ff42b-5c4b-4695-b527-34dfc64585e5",
"unionId": "1c77c660-28fc-4e40-b557-132f3da39597",
"currentApproversStr": "Validation, Civa",
"commentStr": "",
"commentUserName": "",
"commentCreatedAt": "1900-01-01T00:00:00",
"occupationCode": "TECHNICIAN",
"activeApprovalFlowId": 166674,
"isAllowanceOnly": false,
"departmentId": null,
"datePosted": null
},
{
"timecardId": 170802,
"entryHeaderId": "db9341a9-32e8-4d45-a858-a88b75a42cef",
"startsOn": "2021-10-24T00:00:00",
"endsOn": "2021-10-30T00:00:00",
"worksightStatus": "SignedOff",
"projectId": 1977,
"userId": 60874,
"status": "Submitted for Approval",
"batchId": 39814,
"emergencyType": "",
"htgDealMemoId": "0d0ff42b-5c4b-4695-b527-34dfc64585e5",
"unionId": "1c77c660-28fc-4e40-b557-132f3da39597",
"currentApproversStr": "Perf, PA",
"commentStr": "",
"commentUserName": "",
"commentCreatedAt": "1900-01-01T00:00:00",
"occupationCode": "TECHNICIAN",
"activeApprovalFlowId": 166669,
"isAllowanceOnly": false,
"departmentId": null,
"datePosted": null
}
]