>>>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; >>>} >>>>>>
>>> >>>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! >>>} >>>>>>
var Col1Val = MyObject[0].[cCol1Name];>
var ColVal = MyObject[0][oColName];