Не могу вывести inn, name и profile из json?
Пишет - items.inn - undefined variable.
<script>$(document).ready(function() {
$.ajax({
url: "https://xn--80aqahnxhf0b.xn----7sbhaopdx2angr0b9ina.xn--p1ai/data4tilda.php",
dataType: 'json',
success: function(result) {
drawTable(result);
}
});
});
function drawTable(data) {
// console.log('drawTable got data:', data);
var html = '';
for (var i = 0; i < 10; i++) {
html += '<tr><td>' + data[i].items.inn + '</td><td>' + data[i].items.name + '</td><td>' + data[i].items.profile + '</td></tr>';
}
$('#table tbody').append(html);
}
</script>