Mapping Array Child Elements to Non-Array Elements or to an Element in a Non-Matching Array
There may be situations when you want to map an element within an array of objects to an output element that is not in an array or belongs to an non-matching array in the Upstream Output. In such a situation, you must create an array with a single element. You do this by using the array.forEach() function without any arguments. When you use array.forEach() function without arguments, it creates an array with a single object element. The single object element treats everything in the Upstream Output as the children of the newly created array object element. This allows you to map to any of the Upstream Output elements as they are now treated as if they were within an array.
Mapping an array child element to a non-array element is a two step process: