# Refering to variable loadVar dynamically

**URL:** https://forum.kirupa.com/t/refering-to-variable-loadvar-dynamically/105992
**Category:** Uncategorized
**Created:** [March 31, 2004, 9:27pm UTC](https://forum.kirupa.com/t/refering-to-variable-loadvar-dynamically/105992 "2004-03-31T21:27:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Harpreet](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@Harpreet](https://forum.kirupa.com/u/Harpreet)
#### Post date: [March 31, 2004, 9:27pm UTC](https://forum.kirupa.com/t/refering-to-variable-loadvar-dynamically/105992/1 "2004-03-31T21:27:21Z")

</div>

hi guys, I am reading a file with certain user defined variables like  
&x=30&y=50&z=100

Lets the variable is caught in a function as argument myVar

now depending on the variable the user passes I need to fetch the value. ie if the user passes x i need to read the value of x.  
Also keep in mind i dont have any idea how the user has named his/her variables.

What i need to do it get the value of that variable by using loadVar.

this.myVar;  
As such it gives me undefined. There is text present in ‘this’ myVar represents ‘x’  
I have tried eval(this.myVar) as well as this.eval(myVar) but in vain

How can i achieve this ?:q:
