this is simple code which i want to parse values
json array and print data from that,
var data = {
"mobileNumber": "3",
"userContacts": {
"values": [{
"nameValuePairs": {
"contactName": "aaaaa",
"contactPhone": "111111"
}
}, {
"nameValuePairs": {
"contactName": "bbbbb",
"contactPhone": "222222"
}
}]
}
};
var jsonArray = JSON.parse(data.userContacts.values);
for (var i=0; i<jsonArray['values'].length; i++){
//print contactName and contactPhone from nameValuePairs
}
i created this link on jsFiddle
to test that