Using the DotA 2 Web API, I'm trying to get the JSON from a certain URL: https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?match_id=27110133&key=3C2DCF9BA05F56704FDF3F45BE2C6AD3. I would then like to use the JSON object like this json.players[0].kills
.
I open the below html in a file using Chrome, and it gives me the error Uncaught SyntaxError: Unexpected token :
.
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$.ajax({
type: 'GET',
url: 'https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?match_id=27110133&key=3C2DCF9BA05F56704FDF3F45BE2C6AD3',
async: false,
dataType: 'jsonp',
success: function(data)
{
console.log(data);
},
error: function(e)
{
alert(e.message);
}
});
</script>
</head>
</html>
I have used JSON before on iOS, but I am a total noob to web development, so apologies for what is a probably really simple question.