Storing multiple server response from a list of options


I am trying to create a script in Gatling for a scenario where I have to store form variables from
a post request and the value occurs more than once so my approach is
to store the values in an array and use the array values in the succeeding pages.

Could someone please share as to how can I proceed with this approach?


Somewhere in the doc, it talks about various ways to manipulate the response. Basically, you have the json response and you can parse it to find the value or values and store them in your session. Here is a code snippet, where I am browsing the user table and collecting all the "id"s for later use.

.check(, jsonPath("$").findAll.saveAs("user_ids")))

Hope that helps.