【发布时间】:2020-10-23 08:53:10
【问题描述】:
如果 "relatedDecisionTreeQuestionUID": "c68252d0-3f88-e911-a98e-12345600cf35" 然后将 "questionText" 显示为 Blocked 和 UnBlocked,我想为以下响应编写邮递员测试。
请有人帮忙处理一下 javascript
":
[
{
"estimationDuration": "0",
"jobTypeUId": "00000000-0000-0000-0000-000000000000",
"jobType": null,
"relatedDecisionTreeQuestionUID": "c68252d0-3f88-e911-a98e-12345600cf35",
"priorityUID": "00000000-0000-0000-0000-000000000000",
"priority": "",
"decisionTreeUID": "d73657e8-3f88-e911-a98e-11334800cf12",
"workOrderTypeUID": "00000000-0000-0000-0000-000000000000",
"workOrderType": "",
"questionText": "Blocked”,
"childQuestions": [
": [
{
"estimationDuration": "0",
"jobTypeUId": "00000000-0000-0000-0000-000000000000",
"jobType": null,
"relatedDecisionTreeQuestionUID": " c68252d0-3f88-e911-a98e-12345600cf35",
"priorityUID": "00000000-0000-0000-0000-000000000000",
"priority": "",
"decisionTreeUID": "d73657e8-3f88-e911-a98e-00224800cf35",
"workOrderTypeUID": "00000000-0000-0000-0000-000000000000",
"workOrderType": "",
"questionText": " UnBlocked ",
"childQuestions": [
【问题讨论】:
-
我有 pm.test("test", function () { var jsonData = pm.response.json(); jsonData.filter(function(item){ if(item.relatedDecisionTreeQuestionUID=== "c68252d0-3f88-e911-a98e-12345600cf35"){ console.log(item.questionText); } })