success(response) {
$('#api-wb').html(JSON.parse(response).loads.map(n => `
<div class="item">
<div><b>${n.title}</b></div>
<div><a href="${n.comments_url}">comments (${n.comments_num})</a></div>
<div><img src="${n.files[0].small}"></div>
</div>
`).join(''));
}
fetch('https://woobl.ru/php/api/test/1.php?name=1')
.then(response => response.json())
.then(data => data.loads.map(load => console.log(load)));
$.ajax({
url: 'https://woobl.ru/php/api/test/1.php?name=1',
success: function(response) {
var data = JSON.parse(response);
data.loads.map(function (item) {
console.log(item)
})
}
});
JSON.parse()