Create a project in Anypoint Studio and learn the basics of the For Each scope. You see how it handles the payload and variables as it loops over a collection.
Created by Farhan Modjdehi, Principal Strategic Client Architect, MuleSoft Solution Engineering.