How to find the grouping dynamic values

Hi,

scenario1:
Expression in response is as below:

property:{“address”:{municipalname=abc34,postalcode=3253}}&lender:{authorizedoffice:
[{emailid:abc@xyz.com,phnum:2534343}]},{“address”:{municipalname=xyz344,postalcode=7687}}

I have to capture postal code of property and lender, so I write like below:

property:{“address”:{municipalname=(.?),postalcode=(.?}} and for lender

how to capture only postalcode?

lender:{authorizedoffice:
[{emailid:(.?),phnum:(.?)}]},{“address”:{municipalname=(.?),postalcode=(.?)}}

how to capture only lender postalcode?

Scenario2:

Expression in response is as below:

property:{“address”{}}&lender:{authorizedoffice:
[{emailid:abc@xyz.com,phnum:2534343}]},{“address”:{municipalname=xyz344,postalcode=7687}}

I have captured the property postal code from the scenario1 but it is throwing error for scenario2, how to handle this? is there way to pass default values?

Please help mee.

can you help me pleaseee

scenarios are virtual user workflow and correspond to different populations of users. Out of the box, the data you capture from scenario1 is not available for scenario2.
I recommend you read the documentation, go through the tutorials and the Gatling Academy.

Hi,
I have a respone body like below

abc=345&stausvalue=3&xyz=754&count=33
abc=867&stausvalue=3&xyz=237&count=34
abc=537&stausvalue=7&xyz=237&count=66

I have captured abc and count values for stausvalue=3 from above responsecode like below

check(regex(abc=(.?)&stausvalue=3&xyz=(.?)&count=(.*?)).find.saveAs(cor_cnt))

but confused how to substitue’${cor_cnt}’ for abc & count?
shall I use like this for abc=${cor_cnt_g0}
and for count = ${cor_cnt_g2}

https://gatling.io/docs/gatling/reference/current/http/check/

check(""“regex(abc=(.?)&stausvalue=3&xyz=(.?)&count=(.*?)”"")
.ofType[(String, String, String)]
.saveAs(“whatever”))

https://gatling.io/docs/gatling/reference/current/session/expression_el/

then ${whatever._1}, ${whatever._2} and ${whatever._3}