i have a JSON file with some information like the id of a DOM element (textfield or drop down box) and the way how to get the value like val(), text().

```
{
"textfield":"text()",
"textfield":"val()"
} 

```

I use an ajax function to get the json data... this part is ok.

what I'am traying to do is to use the json objects as propertys

```
$.each(jsonData, function(key, getValue){
   console.log($('#myTextfieldID').getValue);
   });

```

or

```
$.each(jsonData, function(key, val){
   console.log($('#myTextfieldID')[getValue]);
   });

```

but the returned value is allways "undefined"

for shure I can do like this.

```
switch (getValue)
    {
    case 'text()':
        console.log($('#myTextfieldID').text());
    break;
    case 'val()':
        console.log($('#myTextfieldID').val());
    break;
    }

```

some one has an idea? Thx for help