How to concatenate two values in an array

Hi-I'm trying to convert the original array below into an array of strings that looks like this:
[
smith@asp.com_xyz@gmail.com,
jones@asp.com_abc@gmail.com
]

This returns ({{64.array}}; email) the emails, ok but map({{64.array}}; email + value) doesn't work.

Original Array
[
    {
        "array": [
            {
                "email": "xyz@gmail.com",
                "value": "smith@asp.com"
            },
            {
                "email": "abc@gmail.com",
                "value": "jones@asp.com"
            }
]

Thanks!

Hi Dan_Hardy, I couldn’t understand you very well**.** Do you want something like this?

{{map(11.array; "email")}}

Integration Tools, Google Calendar.blueprint.json (3.7 KB)

Or something with all of the values

{{flatten(add(emptyarray; map(11.array; "email"); map(11.array; "value")))}}

Array.blueprint.json (3.7 KB)

Hi,

I need it to return an array:

Value1emailaddress_Email1emailaddress,

Value2emailaddress_Email2emailaddress,

Value3emailaddress_Email3emailaddress

Etc

Value is the Google group email address and Email is the Google group member email address. It’s an array of Google group memberships.

Hope that helps clarify. Thanks!

Change the source of the Iterator

I tried this but get the error “Failed to map ‘value’: Function ‘toArray’ finished with error! ‘Value1emailaddress_Email1emailaddress’ is not a valid collection.”. What am I doing wrong?

Use the Original Array as the Iterator source

In the Text Aggregator module, use the Iterator as source, and in Row separator select Other. In Text map the Iterator’s ”value”, add “_”, and the iterator’s ”email”

In the Set multiple variables module, name your variable and use the split function to transform it into an array

{{split(13.text; ",")}}

Array.blueprint (1).json (6.8 KB)

Jonathan, you’re brilliant. That worked! Thanks!

1 Like