Hello there,
I need some help to format a text input in a specific way.
I collect information like email address and opt-in for a newsletter subscription from HelloAsso where one or more user can subscribe at once. There is only one input field with all data wether there is 1 or more subscriber(s).
The final goal is to send each subsriber’s email address in the newsletter app (Brevo), only if the user opted in (but that’s a step further, first I need to format the text input)
Example input for 1 subscriber :“items_custom_fields_answer” : ”email1@gmail.com,yes”}
Example input for 2 subscribers :
“items_custom_fields_answer” : ”email1@gmail.com,yes,email2@gmail.com,yes”}
Example input for 3 subscribers :
“items_custom_fields_answer” : ”email1@gmail.com,yes,email2@gmail.com,yes,email3@gmail.com,no”}
What I would like to do is split the input value “every second items separated with a comma” in order to get this kind of array output :
i
{"email1@gmail.com","yes"},
{"email2@gmail.com","yes"},
{"email3@gmail.com","no"}
]
Do you know if that’s possible with zapier formatting tools ?
Thanks a lot in advance.