-1
"charts":[
        {
          "key": "Passed",
          "values": [ [ 1442856661000, 13082504 ], [ 1442770260000, 34817 ]]
}
]

This is my JSON. How do i access one of the values, i.e, charts.values[0][0]?

charlietfl
  • 170,828
  • 13
  • 121
  • 150

1 Answers1

1

data.charts is an array, therefore you need an index for the access.

var data = {
        "charts": [
            {
                "key": "Passed",
                "values": [
                    [1442856661000, 13082504],
                    [1442770260000, 34817]
                ]
            }
        ]
    };

document.write(data.charts[0].values[0][0]);
Nina Scholz
  • 376,160
  • 25
  • 347
  • 392