I have a json arry
{
    "result": "sucess",
    "senderids": [{
        "id": "2",
        "senderid": "powers",
        "status": "0",
        "type": "2",
        "availa": "0",
        "user": "admin"
    }, {
        "id": "3",
        "senderid": "powert",
        "status": "0",
        "type": "2",
        "availa": "0",
        "user": "admin"
    }, {
        "id": "4",
        "senderid": "powerd",
        "status": "0",
        "type": "2",
        "availa": "0",
        "user": "admin"
    }, {
        "id": "5",
        "senderid": "pavank",
        "status": "0",
        "type": "1",
        "user": "pavan"
    }]
}
Javascript:
var res = xhr.responseText;
var s = res.senderids;
for (i = 0; i < s.senderids.length; i++) {
    var contact = JSON.parse(s.senderids[i].senderid);
    alert(contact);
}
How i can parse this json array using JSON.parse. I have tried this code
thanks in advance



var s = res.senderids;this only will work after you've parsedres.JSON.parsein the loop is way too late :)