Performing checks on saved response

Hello all,

I am performing some transformation in my scenario and saving it as dataString like this -

.check(bodyString.transform(str => str.replace("\", “”)).transform(str => str.replace(""{", “{”)).transform(str => str.replace("}"", “}”)).saveAs(“dataString”))

Is there a way to perform jmesPath/jsonPath on the dataString?

dataString is a JSON and I want to get the value of the name and verify using jmesPath something like “${dataString”}.data.id

Please help.

You have to use a response transformer and replace the existing one with a new StringResponseBody, see https://gatling.io/docs/current/http/http_request/#response-transformers

Thanks for the lead Stephane.

Do you have any sample for multiple string replacement(as shown in my initial query) inside of a transformResponse?

Thanks,
Sowmya