How do get the first name “Niranth” with the following json?
[
{"firstName":"Niranth","lastName":"Padmonkar","wins":12},
{"firstName":"Nick","lastName":"Tallent","wins":10},
{"firstName":"Kyle","lastName":"Brisson","wins":5},
{"firstName":"Kyle","lastName":"Brisson","wins":5}
]
Here’s what I have tried.
var data = Http.responseText;
var objects = JSON.parse(data)
document.getElementById("Slot1Name").innerHTML = data[0].firstName;