Referring multidimensional object???

chrisb29762052 02-09-2015

Not a programmer and it is my first time working with multidimensional object.

I have a table with  fields "MaxDepth" and "TotalDiveTime" and need to refer my variables (Rep1, Rep2, Rep3) to the multidimensional table as illustrated so that I can to run the script that follow to get the needed value in another field of the table refer here as Rep3.


Any assistance would be much appreciated.

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (2)

Answers (2)



you have to declare the object that holds the desired date first.

Then you can read the desired date the following way:

var repTable = {

  a : {a1: 111, a2: 112},

  b : {b1: 221, b2: 222}


  repA = repTable['a']['a1'],

  repB = repTable['b']['b2'];;

Hope this helps.