$(document).ready(function() {
var data = {
status_change: this.value
};
$.ajax({
url: '../json.php',
type: "POST",
data,
dataType: "jsonp",
success: function(response) {
const json = JSON.parse(response);
$('#example').append(
`<tbody>${json.response.items(n =>
`<tr>
<td>${n.title}</td>
<td>${n.director}</td>
<td>${n.year}</td>
<td>${Object.values(n.photo).map(n => `<img src="${n}">`).join('')}</td>
</tr>`).join('')}
</tbody>`
);
}
});
});