Loop inside exec function

Hello Guys,

I couldn’t find anything about this in the documentation, I am wondering if we can loop within the exec function in Gatling, as in looping over a check.

What I want to achieve :

def postOrder(shipmentListTwoProducts: ShipmentList) = {

http(“POST Order”)
// I want to loop here over shipmentListTwoProducts.shipmentList that s=is an array, so I want to call the check as many times as there are items in the array each time // passing a different variable to shipmentListMappingChecks method
index): _*)