how to pass second occurance of corelated value

Hi Stephane,

In my correlation I am capturing all occurrences of one variable and need to pass them in subsequent request. How we achieve this.

Correlation : .check(jsonPath("$.controllerData.MashupRefs.MashupRef[0].Output.Page.Output.Shipments.Shipment[0].ShipmentLines.ShipmentLine…OrderLine.ItemDetails.ItemID").findAll.saveAs(“ItemID”))
Request :

.exec(http(“request_57”)
.post("/isf/store/mashupController.do")
.headers(headers_43)
.formParam(“scControllerData”, “”"{“MashupRefs”:{“MashupRef”:[{“mashupId”:“isf.shipment.summary.getShipmentDetails”,“Input”:{“Shipment”:{“ShipmentKey”:“202108062114381177113”}}},{“mashupId”:“isf.shipment.summary.getShipmentLineList”,“Input”:{“Shipment”:{“ShipmentKey”:“202108062114381177113”}}},{“mashupId”:“isf.shipment.summary.getShipmentAdditionalDetails”,“Input”:{“Shipment”:{“ShipmentKey”:“202108062114381177113”}}},{“mashupId”:“isf.shipment.summary.getShipmentContainerList”,“Input”:{“Shipment”:{“ShipmentKey”:“202108062114381177113”,“isTrackingURLRequired”:“Yes”}}}],“isMultiAPICall”:false}}""")
.formParam(“scCSRFToken”, “${scCSRFToken}”)
.formParam(“scFlag”, “Y”)
.resources(http(“request_58”)
.post("/isf/store/mashupController.do")
.headers(headers_32)
.formParam(“scControllerData”, “”"{“MashupRefs”:{“MashupRef”:[{“mashupId”:“isf.hbc.bagging.extn_getQtyOnHand”,“Input”:{“InventorySupply”:{“ItemID”:“90396619”,“UnitOfMeasure”:“EACH”,“SupplyType”:“ONHAND”,“OrganizationCode”:“BAY”,“ShipNode”:“MFC-963-565”}}}],“isMultiAPICall”:false}}""")
.formParam(“scCSRFToken”, “${scCSRFToken}”)
.formParam(“scFlag”, “Y”)))

.exec(http(“request_59”)
.post("/isf/store/mashupController.do")
.headers(headers_32)
.formParam(“scControllerData”, “”"{“MashupRefs”:{“MashupRef”:[{“mashupId”:“isf.hbc.bagging.extn_getQtyOnHand”,“Input”:{“InventorySupply”:{“ItemID”:“90186422”,“UnitOfMeasure”:“EACH”,“SupplyType”:“ONHAND”,“OrganizationCode”:“BAY”,“ShipNode”:“MFC-963-565”}}}],“isMultiAPICall”:false}}""")
.formParam(“scCSRFToken”, “${scCSRFToken}”)
.formParam(“scFlag”, “Y”))
.pause(7)

Thanks,
Trisha

https://gatling.io/docs/gatling/reference/current/session/expression_el/