You can use the Iterate Step to iterate over an array and map it to any object.
Using your example, we can create a service:
"${model.alias.first_name} ${model.alias.last_name}"
Now run the service and paste the example xml into the xmlExample property then check the output of the service. Looking at the JSON output, it should look like this:
{ "alternateNames": [ "aa aaa", "bb bbb", "cc ccc" ] }
If you want to concatenate the contents of the array, you could use the Iterable method called .join(). So to complete your example, we will concatenate the contents of alternateNames by using the following code
alternateNames.join(', ')
then the value returned is:
aa aaa, bb bbb, cc ccc
Concatenating multiple Gloop model array properties and mapping to a property
Concatenating multiple Gloop model array properties and mapping to a property
I need to iterate an array, concatenate multiple properties and then map it into a property. e.g
The aliases are going to be mapped to a property called alternateNames like so:
Any ideas?