1

像 http.solve 和 http.solveXpath 一样,JSON 有什么相似之处。在提供的截图中,我必须根据该人应该是 MD 或 MD、PhD 的条件来捕获完整的主节点。Jmeter 的 Json 语法:$..[?(@.person_credentials == 'MD' || @.person_credentials == 'MD,PhD')] 寻找可以在 OpenScript 中实现的类似内容 请提供您的输入 谢谢,Sumit

[{
	"person_party_id": 3663409,
	"person_party_number": "1199490",
	"person_party_name": "Andrea Ward",
	"person_obj_version_num": 2,
	"person_profile_id": 31036987,
	"person_profile_obj_version_num": 2,
	"person_name": "Andrea Lee Ward",
	"person_pre_name_adjunct": {
		"lv_type_id": "TCA|CONTACT_TITLE",
		"code": "MS."
	},
	"person_first_name": "Andrea",
	"person_middle_name": "Lee",
	"person_last_name": "Ward",
	"person_name_suffix": null,
	"person_academic_title": null,
	"person_credentials": "HT(ASCP)",
	"person_ptr_number": null,
	"relationship_id": 1760699,
	"relationship_obj_version_num": 2,
	"relationship_party_id": 3959866,
	"relationship_party_number": "52898",
	"relationship_party_name": "Andrea Ward-Chester County Hospital-52898-52898-52898-52898",
	"relationship_party_obj_version_num": 2,
	"org_contact_id": 2006288,
	"org_contact_obj_version_num": 2,
	"is_generic": false,
	"email": {
		"contact_point_id": 1170409,
		"email_address": "andrea.ward2@uphs.upenn.edu",
		"object_version_number": 2
	},
	"phone": {
		"contact_point_id": 1170414,
		"phone_country_code": "1",
		"phone_area_code": "610",
		"phone_number": "431-5561",
		"phone_extension": null,
		"object_version_number": 2
	},
	"roles": [{
		"lv_type_id": "TCA|CONTACT_ROLE_TYPE",
		"code": "ELABUSER"
	}, {
		"lv_type_id": "TCA|CONTACT_ROLE_TYPE",
		"code": "PRIMREL"
	}],
	"contact_id": 3663409,
	"first_name": "Andrea",
	"last_name": "Ward",
	"credentials": "HT(ASCP)",
	"emails": [{
		"contact_point_id": 1170409,
		"email_address": "andrea.ward2@uphs.upenn.edu",
		"related_accounts": null,
		"object_version_number": 2
	}],
	"phone_numbers": [{
		"type": "Telephone",
		"contact_point_id": 1170414,
		"phone_country_code": "1",
		"phone_area_code": "610",
		"phone_number": "431-5561",
		"phone_extension": null,
		"related_accounts": null,
		"object_version_number": 2
	}, {
		"type": "Fax",
		"contact_point_id": 1170417,
		"phone_country_code": "1",
		"phone_area_code": "610",
		"phone_number": "430-2935",
		"phone_extension": null,
		"related_accounts": null,
		"object_version_number": 3
	}]
}, {
	"person_party_id": 3620546,
	"person_party_number": "208332",
	"person_party_name": "James Heald",
	"person_obj_version_num": 5,
	"person_profile_id": 15949851,
	"person_profile_obj_version_num": 2,
	"person_name": "James Irwin Heald",
	"person_pre_name_adjunct": {
		"lv_type_id": "TCA|CONTACT_TITLE",
		"code": "DR."
	},
	"person_first_name": "James",
	"person_middle_name": "Irwin",
	"person_last_name": "Heald",
	"person_name_suffix": null,
	"person_academic_title": null,
	"person_credentials": "MD,PhD",
	"person_ptr_number": null,
	"relationship_id": 1728597,
	"relationship_obj_version_num": 2,
	"relationship_party_id": 3927762,
	"relationship_party_number": "18195",
	"relationship_party_name": "James Heald-Chester County Hospital-18195-18195-18195-18195",
	"relationship_party_obj_version_num": 2,
	"org_contact_id": 1971610,
	"org_contact_obj_version_num": 2,
	"is_generic": false,
	"email": {
		"contact_point_id": 1167675,
		"email_address": "james.heald@uphs.upenn.edu",
		"object_version_number": 2
	},
	"phone": {
		"contact_point_id": 1167678,
		"phone_country_code": "1",
		"phone_area_code": "610",
		"phone_number": "431-5471",
		"phone_extension": null,
		"object_version_number": 2,
		"type": "Telephone"
	},
	"roles": [{
			"lv_type_id": "TCA|CONTACT_ROLE_TYPE",
			"code": "ELABEDSTADM"
		},
		{
			"lv_type_id": "TCA|CONTACT_ROLE_TYPE",
			"code": "ELABSTADM"
		},
		{
			"lv_type_id": "TCA|CONTACT_ROLE_TYPE",
			"code": "PRIMREL"
		}
	],
	"contact_id": 3620546,
	"first_name": "James",
	"last_name": "Heald",
	"credentials": "MD,PhD",
	"emails": [{
		"contact_point_id": 1167675,
		"email_address": "james.heald@uphs.upenn.edu",
		"related_accounts": null,
		"object_version_number": 2
	}],
	"phone_numbers": [{
			"type": "Telephone",
			"contact_point_id": 1167678,
			"phone_country_code": "1",
			"phone_area_code": "610",
			"phone_number": "431-5471",
			"phone_extension": null,
			"related_accounts": null,
			"object_version_number": 2
		},
		{
			"type": "Fax",
			"contact_point_id": 1167683,
			"phone_country_code": "1",
			"phone_area_code": "610",
			"phone_number": "430-2935",
			"phone_extension": null,
			"related_accounts": null,
			"object_version_number": 2
		}
	]
}]

4

0 回答 0