Pass contents of UI vision variable into executeScript code?

I have a number stored in a variable. How can I use that number in an executeScript? I am running

async function someCode() {

.....

}

and I want to pass the value of a UI Vision variable into that code. If I use ${variable} it doesn’t work as it is interpreting it literally.

For example

async function someCode() {

.....
${uivision_variable}

}

Is this possible? @admin @Plankton

Sure, see my answer in the web api thread.