2. โข Mule provides Foreach scope to process a message which
contains a collection payload
โข Foreach splits collection into elements then process them
iteratively
โข The Foreach scope can split and process collections of
elements that are not part of the message payload. For
example, Foreach can process message property collections
from the message header
3. Message payload Collection
Let us process below Json array (a collection payload) using Foreach
[
{
โnameโ: โRamโ,
โageโ: 27
},
{
โnameโ: โNagโ,
โageโ: 28
},
{
โnameโ: โAmarโ,
โageโ: 28
}
]