[
{
"id": 1,
"name": "MetaOperationN1",
"type": "Operation"
},
{
"id": 2,
"name": "GreenOper2",
"type": "Operation"
},
{
"id": 3,
"name": "GreenOper4",
"type": "Operation"
},
{
"id": 4,
"name": "GreenOper5",
"type": "Operation"
},
{
"id": 5,
"name": "GreenOper6",
"type": "Operation"
},
{
"id": 6,
"name": "GreenOper7",
"type": "Operation"
},
{
"id": 7,
"name": "GreenOper8",
"type": "Operation"
},
{
"id": 8,
"name": "GreenOper9",
"type": "Operation"
},
{
"id": 9,
"name": "GreenOper10",
"type": "Operation"
},
{
"id": 10,
"name": "GreenOper11",
"type": "Operation"
}
]
答案 0 :(得分:1)
使用具有以下配置的正则表达式提取器:
ID
"id": (\d+),
$1$
-1
使用JSON Path Extractor(可通过JMeter Plugins获得)
ID
$..id
在这两种情况下,您都会将ID列表作为:
ID_1=1
ID_10=10
ID_2=2
ID_3=3
ID_4=4
etc.
有关安装JSON Path Extractor和JSON Path语言的更多信息,请查看Using the XPath Extractor in JMeter(向下滚动到"解析JSON")
答案 1 :(得分:0)