Antonio
Antonio

Reputation: 23

Jmeter extract a value using BeanShell PostProcessor

I want to extract b from the following response and use it as a parameter for a new request, can you help me?

Response:

[[
{"a": { "x": "123", "y": "456", "z": "789" }, "p": ["111"], "q": "222"},
"b"
]]

Upvotes: 1

Views: 491

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34566

No need for Beanshell here.

Use JMeter 3.0 JSON Path Post Processor with following JSON Path Expression:

$..[1]

See this plan:

enter image description here

Syntax is described here:

Upvotes: 1

Related Questions