Dynamically calculate and pass value in subsequent request

I am trying to find a way to pass dynamic value in subsequent requests.

Below is my scenario:

val scn1 = exec(http("Scenario")
  .get("url with params")

You can use below code for passing str values as.

exec(session => {
val c_list1ofvalues = session(“list1ofvalues”).as[List[String]]
val list2ofvalues = session(“list1ofvalues”).as[List[String]]
val c_list1ofvalues_count = session(“list1ofvalues_count”).as[Int]
val randomInt = ThreadLocalRandom.current.nextInt(c_list1ofvalues_count)
val str1 = c_list1ofvalues(randomInt)
val str2 = list2ofvalues(randomInt)

Thanks G

Somehow I managed to map the values differently.
Sorry, I missed to specify 4the step in the post which is the main last step.

4 steps: