Nekres.1038:

Hey, I have a problem getting my current pvp standings.
Í am able to do API request and I do get the JSON.
But I am unable to select the table of season 2 in javascript.
The JSON looks like this:
[ {"current":{"total_points “:26,”division “:1,”tier":2,"points “:1,”repeats “:0},”best":{"total_points":27,"division “:1,”tier “:2,”points “:2,”repeats “:0},”season_id":“44B85826-B5ED-4890-8C77-82DDF9F2CF2B”},{"current":{"total_points “:106,”division “:4,”tier “:3,”points “:1,”repeats “:0},”best":{"total_points “:107,”division ":4, "tier “:3,”points “:2,”repeats “:0},”season_id":“95D5B290-798A-421E-A919-1C2A75F74B72”}]

When I do
var data = _getJSON(URL)
data[1 ]
it should respond with the second table of ‘current’, but it does not and it does not respond with error.

Further I wanted to get the division. But how to do so?
data[1 ].current[‘division’] – does not reply :/

Sorry for this question. I am still learning how to decipher JSON.

Nekres.1038:

I am very sorry. Can be closed.

I forgot to parse the data as JSON.
var data = _getJSON(apiURL + ‘/v2/pvp/standings’);
data = JSON.parse(data);
$.consoleLn(data1.current[‘division’]);
returned: 4.0