How this variable gets data?

we have not defined this variable in the script.

can we use this variable like this ? how it will get data ?

@cofactor take a look at this blog post that walks through http connector’s usage: https://medium.com/@stephenrussett/handling-government-business-processes-across-administrative-divisions-digitalstate-406f86d4fd56

It is best to do something like var myVar = connector.getVariable(‘selectedAddressDetail’)

we are just accessing the value here…right ?

my confusion is where do you define and populate data into this ?

Take a look over the docs on variables: https://docs.camunda.org/manual/7.5/user-guide/process-engine/variables/#set-and-retrieve-variables-overview

You are either saving process variables or local variables as per the docs. In your script you are either getting or setting variables.