I have data in this format:
[{"data":{"maximum_seconds":"-1","emergency_address_code":"","e999_code":""},{"data":{"maximum_seconds":"-1","emergency_address_code":"","e999_code":""}}]
I am trying to read using JQuery.
I have tried multiple options, but none seem to be working.
for(var i in data) {
console.log( data.maximum_seconds);
console.log( data[i].maximum_seconds);
}
console.log( x[1].maximum_seconds);
my code is as follows:
var x = voip_get_numbers('', ''); var x = voip_get_numbers('', ''); x.done(function(data) { $('#d').append(data);
for(var i in jsonObjData) {
console.log( data[i] );
}
});
any my JQuery function is:
function voip_get_numbers(account_seq, customer) {
return $.ajax({
url : '/section/voip/numbers',
type: "GET",
data: {
"action": "list_numbers",
"seq": account_seq,
"customer": customer,
},
datatype: 'json',
});
}
I did try some others, but my code has been overwritten so i don't have it - i think its a fairly simple task but i'm not the best with JQuery and JS so excuse my ignorance.
Any help would be great, please.
Thank you