Всем привет.
Не могу достать nameEN из API
Нужно достать nameEN":"The Death and Life of John F. Donovan" и "nameEN":"Adele: Hello"
{"peopleID":"1595490","webURL":"http:\/\/www.kinopoisk.ru\/name\/1595490\/","nameRU":"\u0410\u0434\u0435\u043b\u044c","nameEN":"Adele","sex":"female","posterURL":"actor_iphone\/iphone_1595490.jpg","growth":175,"birthday":"05.05.1988","age":"28","birthplace":"\u041b\u043e\u043d\u0434\u043e\u043d, \u0410\u043d\u0433\u043b\u0438\u044f, \u0412\u0435\u043b\u0438\u043a\u043e\u0431\u0440\u0438\u0442\u0430\u043d\u0438\u044f","filmography":[[{"filmID":843066,"professionText":"\u0410\u043a\u0442\u0440\u0438\u0441\u0430","professionKey":"actor","nameRU":"\u0421\u043c\u0435\u0440\u0442\u044c \u0438 \u0436\u0438\u0437\u043d\u044c \u0414\u0436\u043e\u043d\u0430 \u0424. \u0414\u043e\u043d\u043e\u0432\u0430\u043d\u0430","nameEN":"The Death and Life of John F. Donovan","year":"2017"},{"filmID":960434,"professionText":"\u0410\u043a\u0442\u0440\u0438\u0441\u0430","professionKey":"actor","nameRU":"","nameEN":"Adele: Hello (\u0432\u0438\u0434\u0435\u043e)","year":"2015"}],
Делаю так:
$.getJSON('ссылка на API',{},function (data) {
var html = '<style>мои стили</style>';
data.filmography.forEach(function(element) {
html += '<a href="ссылка' +element.nameEN+ '">' +element.nameEN+ '</a>';
})
document.getElementById("myblock").innerHTML=html;
});
Но выдаёт undefined undefined
В чём ошибка?