function MyTest() { var MyObject = .... object is created // It is known that the MyObject refers to an array of two columns // To get value of the row 0 and column named "MY_COL1" var Col1Val = MyObject[0].MY_COL1; }Now I want to pass the name 'MY_COL1' to the above function so that it can be used with various objects.
MyTest("MY_COL1"); function MyTest( cCol1Name ) { var MyObject = .... object is created // It is known that the MyObject refers to an array of two columns // To get value of the row 0 and column named "MY_COL1" var Col1Val = MyObject[0].cCol1Name; // Does not work! }TIA