mercredi 12 novembre 2014

how to parse nested json in javascript


Vote count:

-1




I have a Json data which looks like



[
{
"IncidentDate":"11/11/2014",
"ComputerHits":[
{
"Computer":"abc",
"Hits":1
},
{
"Computer":"contoso-cscoISE-syslg",
"Hits":27
}
]
},
{
"IncidentDate":"11/12/2014",
"ComputerHits":[
{
"Computer":"abc",
"Hits":9
},
{
"Computer":"contoso-cscoISE-syslg",
"Hits":66
}
]
}]


How do i parse them into a array in javascript like



abc= [{Hits:1},{Hits:9}]

contoso-cscoISE-syslg = [{Hits:27},{Hits:66}]


for adding them into a jqx chart , can anyone please help



asked 48 secs ago







how to parse nested json in javascript

Aucun commentaire:

Enregistrer un commentaire