update a session variable in a foreach block.

I need to retrieve some values from a json response and build a subsequent request with the response. This needs to be unique for each virtual user. I try to retrieve the response and build a List of Json Objects. This works well with single user, but I am getting incorrect result of the session variable when I increase the number of users. Can someone help me understand what is wrong in this?

val GetJobsRequestToPublish = exec(
  http("Get Job Request To Publish")
    .check(status.in(200 to 210), bodyString.saveAs("GetJobPublishResponse"),
      jsonPath("$.id").saveAs("PublishMetajobId"), jsonPath("$.tasks[0].id").saveAs("PublishMetataskId"),
  .foreach("${PublishAssetJobs}", "assetJob") {
    var assetJobPayloads = ListBuffer[JsObject]();
    exec(session => {
      val result:List[(String, String)] = for {
        Some(M(map)) <- List(JSON.parseFull(session("assetJob").as[String]))
        S(assetId) = map("id")
        L(tasks) = map("tasks")
        M(task) <- tasks
        S(taskId) = task("id")
      } yield {
        (assetId, taskId)
      val (assetId, taskId) = result.unzip
      val assetJobPayload : JsObject = Json.obj(
        "jobId" -> assetId.head,
        "taskId" -> taskId.head,
        "properties" -> Json.obj(
          "reject" -> false
      assetJobPayloads += assetJobPayload;
      println("The Consolidated Asset Payload is " + assetJobPayloads)
      session.set("assetJobPayloads", assetJobPayloads)

how about you get your stuff using that call add .silent at the end this way the get won’t show in the report and then have another exec to do what you need to do?