Hi Vignesh,
To show the variables on the page, you will still need to have a global variable.
You can just keep using the structure file, and create and fill the global variable from JavaScript.
For instance, this particular set of structures can be set to the global variable 'session' with some contents the following way:
script.global.session = new script.structure.SessionStructure({data: {FunctionKeys : { key: ['F1', 'F3', 'F5'], description: ['Help', 'Exit', 'Browse'] }}});
Of course the data I've added is just some static mocked up data, it will also be possible to just create an empty structure and fill the data dynamically in JavaScript.
Hope this helps,
Regards,
Roger van Valen.