1 answer
HI @Ishwar D ,
After Foreach splits a message collection and processes the individual elements, it doesn’t re-aggregate those individual elements into a MuleMessageCollection; rather, it returns the original message. (This results in "Java in, Java out" rather than "Java in, MuleMessageCollection out.")
So it means, whatever payload you were having before the for-each scope, the same payload you will be getting the scope, it is not going to impact our actual payload. That is why you will not get particular key in the component.
But still if you wants to return particular key then simply put a transformation which will return payload[index].
It will resolve your issue.
Regards,
Lalit Panwar