Ramdomize a select value

I simulate selecting a product in my application.
My get method return a json with severals product object.
I want to select id, number and version in random way for the moment I select them with an Int value = 1 which I provide every time.

.check(status.in(200 to 210))

Would you like to help me please.

First, you have to use ofMap to tell Gatling you want to extract JSON objects (Java Maps) to directly capture nodes, not fields/leaves.
Then, you have to use findRandom() to tell Gatling you want to extract one random result amongst all the matches.


Then, later, when you have to use Gatling Expression Language to access the different fields, you’ll have to use the access by key notation.


Thank you very much it works.