JOIN
joins arguments with a provided delimiter argument. It can take an arbitrary number of optional arguments.
Function category: Text​
JOIN(arg1, arg2, [arg3])
Argument | Description |
| Delimiter used to join text. |
| String or array of strings. |
| Optional. Another string or array of strings. |
Let's say we're given the following response that includes a list of car manufacturers for a given part:
{"data": {"parts": {"part_1": ["Toyota","Hyundai","Kia","Mercedes Benz"],"part_2": ["BMW","Mercedes Benz","Ford","Tesla"]}}}
If we want to create an easier to read version of the distributors for a given part, use the following function.
# Create a readable parts distributor listJOIN(", " data.parts.part_1)​# Returns "Toyota, Hyundai, Kia, Mercedes Benz"
If we want to add the third optional argument to combine multiple values or arrays, use the following function.
# Create a readable parts list using multiple distributor listsJOIN(", " data.parts.part_1, data.parts.part_2)​# Returns "Toyota, Hyundai, Kia, Mercedes Benz, BMW, Mercedes Benz, Ford, Tesla"