I am trying to feed off a youtube playlist into the webpage, this is the response I get from the API call:
notice that “items” is an array in the picture.
but the result i get from: console.log(typeof data.items);
is object
in this picture it shows data.items is array
so what it is then?? Array or object?
this is my code:
/*
Load Playlist
*/
function loadPlayList(data) {
console.log(data.items);
console.log(typeof data.items);
data.items.forEach(
function (item, index, array) {
var thumbnail = data.items.snippet.thumbnails.medium.url;
document.getElementById('youtube_playlist').innerHTML = `
<div class="individual_list_item">
<img src="${thumbnail}" alt="video_thumbnail_placeholder" class="thumbnails">
<div class="video_descriptions">
<h4 class="playlist_titles">Video Titles</h4>
<p class="playlist_descriptions">asd</p>
</div>
</div>
`;
}
);
}