{
"telefoane":[{
"id":"1",
"tel":"0743127315"
},
{
"id":"2",
"tel":"072245875"
},
{
"id":"3",
"tel":"0756129458"
},
{
"id":"4",
"tel":"0725127216"
},
{
"id":"5",
"tel":"0723127322"
}]
My code, that can be seen below does not output the desired result:
$.ajax({
url: 'telefoane.json',
dataType: 'json',
success: function(data){
$.each(data.telefoane, function() {
console.log(this.id + ": " + this.tel);
});
}
});
What am I doing wrong? Thank you!