var data = getJSON("https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&playlistId=PLhedRbFZOuDN1rkqCdH1P8Qxvo-a3fAcu&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c&maxResults=50");
+
−
var jsondata = JSON.parse(data);
+
−
var videos = jsondata['items'].slice(Math.max(jsondata['items'].length - 50, 1));
+
−
var totalviewcount = 0;
+
−
for(var video in videos){
+
−
var metadata = getJSON("https://www.googleapis.com/youtube/v3/videos?part=statistics&id=" + videos[video]['contentDetails']['videoId'] + "&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c");
var data = getJSON("https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&playlistId=PLhedRbFZOuDN1rkqCdH1P8Qxvo-a3fAcu&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c&maxResults=50");
+
−
var jsondata = JSON.parse(data);
+
−
var videos = jsondata['items'].slice(Math.max(jsondata['items'].length - 50, 1));
+
−
var totalviewcount = 0;
+
−
for(var video in videos){
+
−
var metadata = getJSON("https://www.googleapis.com/youtube/v3/videos?part=statistics&id=" + videos[video]['contentDetails']['videoId'] + "&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c");