Use the String Join function to concatenate the list of strings in the first argument using the second argument as a separator for each member in the list. Unlike the Concat function, which requires atomic values, the String join function can operate on a locally repeating element.
For the Value
field for each parameter, choose one of the following actions:
- Specify a text value.
- Specify a function value.
- Use a variable to return the value.
- Specify a value from the Input tree.
The character string or strings that you want to join. For example, you can specify an element in the feed Input tree that is a locally repeating element (has more than one element).Separator
The character or characters to use as the separator. If you specify an empty string (""), then the input strings are concatenated without any separator.
The String Join function returns a single string value
In the following example of an input feed, the cuisine
element in a restaurant feed is a locally repeating element:
Following is an example of one entry in the source data:
In the Transform operator add a new element called cuisines
. For that new element, specify the String Join function. Set the Input argument to the cuisine
element in the input feed:
If you set the Separator argument to a comma followed by space character ", "
, the resulting element looks like this:
<cuisines>Italian, Pasta, Pizza, Seafood</cuisines>
If you set the Separator to ""
(an empty string), the result looks like this:
Parent topic: Builtin functions: imc3