Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm new to jmeter.
I want to save the value of the key in a variable, if the id is 7106 from the following response

[{"id":"MAIN","key":1},
{"id":"87","city":"Roselle","key":1000,"state":"IL"},
{"id":"7102","city":"Chicago","key":110,"state":"IL"},
{"id":"7106","city":"Crown Point","key":110038,"state":"IN"},
{"id":"7108","city":"Indianapolis","key":1139,"state":"NJ"}]

How to do it in jmeter?

question from:https://stackoverflow.com/questions/65850408/jmeter-how-to-use-json-path-extractor

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

Here are some options:

Option 1: Regular Expression Extractor

enter image description here

Option 2: JSON JMESPath Extractor

enter image description here

Option 3: JSON Extractor

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...