How to store multiple Jason path element value for multiple post response and pass these to successive multiple post requests.

I am using GATLING 3.0.0 RC4 version

Senario ( working):

  1. for when inject user is set to 1 , below code is working fine…i.e id_fcp is saved successfully in post request STEP1 and same value will be successfully passed to post request STEP3 and both requests works fine.

Senario(failing):

  1. for when inject user is set to 20 ( multiple), below code is not working fine…i.e id_fcp is not saved successfully in post request STEP1 and same value not passed to post request STEP3 with below error. Also mentioned comments about STEP1 and STEP3 in code below

STEP3: Failed to build request: No attribute named 'id 356 (36.74%)
_fcp’ is defined

Question: How to store multiple jason path element value for multiple post response ( STEP1) and after this how to pass successfully these stored values for successive multiple post requests (STEP3) ?

Code snippet:

val scn20 = scenario(“Given Senario”)
.during(30){
.exec(http(“STEP1”) // 20 response value need to be stored in name i.e id_fcp
.post(“url1”)
.headers(headers_10)
.check(status.is(201))
.check(jsonPath("$…name").saveAs(“id_fcp”)))
.pause(5)
.exec(http(“STEP2”) // Here’s an example of a POST request
.post(“url2”)
.headers(headers_10)
.body(ElFileBody(“2.json”)).asJson
.check(status.is(201)))
.pause(2)
.exec(http(“STEP3”) // All 20 id_fcp which stored in STEP1 need to passed to 20 parallel requests which is generated in STEP3
.post(“url3?FCPId=${id_fcp}&Id=${testLoc_neul}”)
.headers(headers_10)
.body(ElFileBody(“connectOnt.json”)).asJson
.check(status.is(201)))
.pause(1)

}

setUp(scn20.inject(atOnceUsers(20)).protocols(httpProtocol))