01-24-2024 11:46 AM
Hi, I would believe my questions is pretty simple. But I just can't figure out how to do this. In my payload schema, I retrieve an array of strings. I call it mail_of_signers. So I have an array that contains a lot of email adresses.
I want to add these email adresses individually as a string format, into a field which only accepts one or more strings.
Hope it makes sense, if not I can elaborate.
04-12-2024 03:38 AM
Hi @MaxLaks
Yes, we can do that, if you could able to share the example schema that would be help full. So that I can able give a proper solution for this.
Regards,
Prajwal Prasanna
04-12-2024 04:07 AM
I am assuming that your output is coming as -
{
"message": [
"sample@email.com",
"sample2@email.com",
"sample3@email.com"
]
}
The result you are expecting is - to map to your target field which accepts the multiple email address in the string format.
{
"message": "sample@email.com, sample2@email.com, sample3@email.com"
}
for this to achieve:
=.to_s.gsub(/[\[\]\"]/, "[" => "", "]" => "", "\"" => "")
by using the above formula you can easily convert the array of emails/strings into a single string with the comma separated values and map to the target step.
If this doesn't solve you problem let me know with the actual schema and the result schema that you are expecting.
Regards,
Prajwal P