>>comments can be misleading: untested
>>
>>function MyTest( cCol1Name ) {
>>var MyObject = .... object is created
>>var Row = MyObject[0].cCol1Name;
>>var Col1Val = Row[cCol1Name]
>>// var Col1Val = eval( "Row." + cCol1Name)
>>}
>>>>>
>
>Thank you.
The commented eval() should work as well, but is considered by some to be an anti-pattern. Was a bit short in my explanation ;-)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only