-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
  • 169,044
  • 13
  • 113
  • 146

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
  • 351,820
  • 24
  • 303
  • 358