PavanS
PavanS

Reputation: 327

Filter partial JSON extractor response and send it as a request

I am working on the Rest API performance testing and I'm handling the JSON responses for the requests. How to split the response partialy and send it to the next request

I did use the online tool for JSON extractor but nothing helped.

Sampler (Api) Response : { "ResponseCode": "200", "Response" : "PON CFF2345 893939", "Message" : null }

Based on the above response i used the JSON Extractor post processor and the json path expression as ($.Response)

Actual result : "PON CFF2345 893939"

But I want to extract the value only CFF2345 and send that value to the next sampler

Upvotes: 0

Views: 344

Answers (1)

Ori Marko
Ori Marko

Reputation: 58792

You need to add after JSON extractor a Regular Expression extractor

Choose JMeter Variable Name to use the JMeter variable you saved

Use (\w+) as Regular Expression Template $1$ and Match No. 2 to get second string

Upvotes: 2

Related Questions