Share feedback, ideas and get community help

Updated 3 months ago

about scripts

I wanted to know how to pull a variable out of the script, if it is possible to do this? Because I have a variable that is an array, but I need to treat it as a string so that I can make another request.
Attachment
Imagem_do_WhatsApp_de_2024-08-07_as_18.02.30_6943c88c.jpg
g
1 comment
Can't you just access the item in the array with the inline notation as shown here:

https://docs.typebot.io/editor/variables

Specifically:

If you would like to get the first item of a list:

{{={{My variable}}[0]=}} or {{={{My variable}}.at(0)=}}

Likewise for last item:

{{={{My variable}}.at(-1)=}}

If it doesn't work to get the variables directly or feels too confusing, you could set a separate variable with that code and just assign the array item to it.
Add a reply
Sign up and join the conversation on Discord