0
I am including on my website my Youtube channel with the videos. But there is a part of Json that I’m not getting back.
I’m doing like this:
$.each($feed.items, function(i,item){
var url = item.videoId;
I commented in the code the line for you to see from Json. But it’s coming Undefined.
{
"kind": "youtube#searchListResponse",
"etag": "\"***/***"",
"nextPageToken": "CAUQAA",
"pageInfo": {
"totalResults": 9,
"resultsPerPage": 5
},
"items": [
{
"kind": "youtube#searchResult",
"etag": "\"***/***"",
"id": {
"kind": "youtube#video",
"videoId": "*************" ############################## AQUI
},
"snippet": {
"publishedAt": "2015-05-26T17:47:49.000Z",
"channelId": "****",
"title": "TITULO",
"description": "",
"thumbnails": {
"default": {
"url": "default.jpg"
},
"medium": {
"url": "qdefault.jpg"
},
"high": {
"url": "hqdefault.jpg"
}
},
"channelTitle": "TESTE",
"liveBroadcastContent": "none"
}
},
Try to do so:
var url = item.items.videoId;
.– stderr
So there’s no way. I managed to solve it. I gave one console.log(item) and saw how he was returning. I will post.
– Diego Souza
Diego, if possible post the solution and then mark as accepted. =)
– stderr
Not for two days.
– Diego Souza