T
Typebot9mo ago
Kramer

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.
No description
1 Reply
greenrhyno
greenrhyno9mo ago
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.

Did you find this page helpful?