How to filter backslash in Jmeter response body?

21 Views Asked by At

I have a request which will return a redirect URi, in Jmeter I get this response:

{
   "redirect_uri": "http:\/response.com/path
}

I want to filter it out, to change back into:

http://response.com/path

How can I achieve this, please help.

1

There are 1 best solutions below

0
Ivan G On BEST ANSWER

If you use JSON Extractor it will automatically remove escape characters

enter image description here

Check out How to Use the JSON Extractor For Testing for more information

There is also __strReplace() function available in Custom JMeter Functions bundle which can be installed using JMeter Plugins Manager so for non-JSON response types you can substitute any character or combination of characters with another character or combination (including empty string) but it might not be the best idea in your case so just go for JSON Extractor