我有Json响应:将响应提到为filter =
toString()
我需要计算jmeter中数组列表的长度。
[
{
"dLine": [
{
"serviceItem": "SGR40400003",
"delivery": "HD~1~1",
"unitOfMeasure": "ORDERS"
},
{
"serviceItem": "SGR40400001",
"delivery": "HD~1~2",
"unitOfMeasure": "ORDERS"
}
]
}
]
尝试了另一种情况:
JSONArray equipmentParts = new JSONArray(filter);
JSONArray parts = new JSONArray();size = equipmentParts.length();log.info(size);