title: Extracting data from a YouTube playlist XML
body: <p><em>I'm a JavaScript and YouTube API beginner</em></p>
  
  <p>I'm trying to access some data from an xml file. It's the atom file generated from a YouTube playlist. I want to be able to extract the thumbnail, videoid and description of each video in the list.</p>
  
  <p>Here's some js I've cobbled together:</p>
  
  <pre><code>$.get("playlist.xml", function(xml){
  var videos = $.xml2json(xml);
  alert(videos.entry[0].title);
  console.log(videos);    
  });
  </code></pre>
  
  <p>playlist.xml contains the file generated from a call to:</p>
  
  <pre><code>https://gdata.youtube.com/feeds/api/playlists/playlistid?v=2
  </code></pre>
  
  <p>where playlistid is a valid playlist id. </p>
  
  <p>The file contains all of the expected xml and it's converted to json (via JQuery XML to JSON plugin) with the line:</p>
  
  <pre><code>var videos = $.xml2json(xml);
  </code></pre>
  
  <p>The code at the top gives me the expected output, ie: the title of the first video in the playlist.</p>
  
  <p>My problems arises when I try to access other pieces of data. The thumbnail, for example, is found in the xml here: </p>
  
  <pre><code>entry[].media:group.media:thumbnail[]
  </code></pre>
  
  <p>It appears that after conversion to json, the ":" are converted to "$", but i get errors errors when I try either: </p>
  
  <pre><code>    $.get("playlist.xml", function(xml){
  var videos = $.xml2json(xml);
  alert(videos.entry[0].media:group.media:thumbnail[0]);
  console.log(videos);    
  });
  </code></pre>
  
  <p>or: </p>
  
  <pre><code>    $.get("playlist.xml", function(xml){
  var videos = $.xml2json(xml);
  alert(videos.entry[0].media$group.media$thumbnail[0]);
  console.log(videos);    
  });
  </code></pre>
  
  <p>The errors are variations of: </p>
  
  <pre><code>TypeError: videos.entry[0].media$group is undefined
  </code></pre>
  
  <p>I feel like I'm not understanding something very basic, but for the life of me I don't know what it is.  </p>
  
  <p>Here's a sample playlist xml file, if it will help:
  <a href="https://gdata.youtube.com/feeds/api/playlists/PLjyIfAzy9xVUWYcLK54OPd1lDXzMROK_5?v=2" rel="nofollow">https://gdata.youtube.com/feeds/api/playlists/PLjyIfAzy9xVUWYcLK54OPd1lDXzMROK_5?v=2</a></p>