Reputation: 59
I have an api response coming as an array. [{"data1":763,"data2":"jhgf"}]
How can i read a single value from this and assign it to a variable in jmeter. This value is required to pass on to the next request.
Upvotes: 0
Views: 130
Reputation: 168072
Which exact value?
You can use JSON Extractor for parsing the response and if you want 763
- use the following JsonPath expression:
$..data1
if you want jhgf
- the relevant JsonPath expression will be correspondingly
$..data2
More information: How to Use the JSON Extractor For Testing
Upvotes: 1