He conseguido obtener la id poniéndolo de esta forma:
Código Javascript
:
Ver originalvar videoInfo = {"apiVersion":"2.0","data":{"updated":"2010-10-18T05:16:55.000-07:00","totalItems":84,"startIndex":1,"itemsPerPage":1,"items":[{"id":"dMH0bHeiRNg","uploaded":"2006-04-06T21:30:53.000Z","updated":"2010-10-23T10:32:22.000Z","uploader":"judsonlaipply","category":"Comedy","title":"Evolution of Dance - By Judson Laipply","description":"For more visit http://www.mightaswelldance.com","tags":["Dancing","comedy"],"thumbnail":{"sqDefault":"http://i.ytimg.com/vi/dMH0bHeiRNg/default.jpg","hqDefault":"http://i.ytimg.com/vi/dMH0bHeiRNg/hqdefault.jpg"},"player":{"default":"http://www.youtube.com/watch?v\u003ddMH0bHeiRNg&feature\u003dyoutube_gdata_player"},"content":{"1":"rtsp://v5.cache7.c.youtube.com/CiQLENy73wIaGwnYRKJ3bPTBdBMYDSANFEgGUghzdGFuZGFyZAw\u003d/0/0/0/video.3gp","5":"http://www.youtube.com/v/dM84H0bHeiRNg?f\u003dstandard&app\u003dyoutube_gdata","6":"rtsp://v3.cache8.c.youtube.com/CiQLENy73wIaGwnYRKJ3bPTBdBMYESARFEgGUghzdGFuZGFyZAw\u003d/0/0/0/video.3gp"},"duration":360,"rating":4.67,"likeCount":"666910","ratingCount":727049,"viewCount":154839729,"favoriteCount":968126,"commentCount":479677,"accessControl":{"syndicate":"allowed","commentVote":"allowed","rate":"allowed","list":"allowed","comment":"allowed","embed":"allowed","videoRespond":"moderated"}}]}}
alert(videoInfo.data.items[0].id)
El problema es cuando quiero obtener la información de un archivo externo, aunque sea del mismo dominio no hay forma.
Alguien es capaz de explicarme cómo podría hacer algo de este tipo:
Código Javascript
:
Ver originalvar videoInfo = SE_OBTIENE_EL_JSON_DESDE_UN_ARCHIVO_EXTERNO
alert(videoInfo.data.items[0].id)
Saludos.