litterbugkid
litterbugkid

Reputation: 3666

Extracted some JSON into a variable, now want to extract JSON from that variable into another variable

I have extracted a JSON snippet from a response body into variable_A. Now I want to extract some JSON from variable_A to be used within the request URL of an HTTP Request.

How do I do this?

Upvotes: 0

Views: 26

Answers (1)

Dmitri T
Dmitri T

Reputation: 168247

The same way you did for the response body, but now configure JSON Extractor to read not the response body, but rather specify variable_A in "JMeter Variable to Use" section:

enter image description here

Given variable_A is a valid JSON you should be able to use JsonPath and extract "interesting" value(s) from it.

More information: API Testing With JMeter and the JSON Extractor

Upvotes: 1

Related Questions