Hey!
I want to replace the string values into an array and send to the webhook.
That's what I'm doing:
1 step. I get a string with values separated by commas
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/029db083-72ee-4dca-9337-43ee754bf1b0.png)
2 step. I use “Code by Zapier” for split by “, ” and creating an array
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/3b1ce09a-b72f-42ac-bb5c-e7fe73128e99.png)
And this is work!
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/bdcaedd0-5737-4fb8-85c5-176c189bb03d.png)
3 step. Send this Array to Webhook
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/778b785b-b6d6-4a81-9c5b-eac8e6849e46.png)
As a result, this is what I get
[
{
"like2": "Variant 5,\nVariant 4,\nVariant 3"
}
]
But I need to get it in a different form, with this
{
"like2": ["Variant 5", "Variant 4", "Variant 3"]
}
- I want array only from value
- I also want to delete the "\n"
Please help me how to do this?
Best answer by Troy Tessalone
View original