title: jQuery Flickr API simple search and display results
body: <p>I'm trying to build a simple HTML document, for a class assignment, that will allow users to search flicker and display 10 results based on their search.</p>
  
  <p>I've built the URL for the search and it seems to work just fine: <a href="http://api.flickr.com/services/rest/?&amp;method=flickr.photos.search&amp;tags=thor&amp;api_key=b49d87bfd659c5768ab0eafa74f2b6a5&amp;per_page=10" rel="nofollow">http://api.flickr.com/services/rest/?&amp;method=flickr.photos.search&amp;tags=thor&amp;api_key=b49d87bfd659c5768ab0eafa74f2b6a5&amp;per_page=10</a></p>
  
  <p>It requests info based on the tag "thor" and displays 10 results in xml. good so far...</p>
  
  <p>Next i want to be able to store certain parts of the XML so i can use them to display the images. Based on Flickr API information I require the following... ID, farm, server, and secret. </p>
  
  <p>I am using the following code to do this.</p>
  
  <pre><code>$(document).ready(function() {
      $.get('api.flickr.com/services/rest/?&amp;method=flickr.photos.search&amp;tags=thor&amp; api_key=b49d87bfd659c5768ab0eafa74f2b6a5&amp;per_page=10',function(data) {
          var items=[];
          $.each(data.photos.photo, function(index, value) {
              var ident=(value.id);
              alert(ident);
          });
      })
  });
  </code></pre>
  
  <p>This is not working. The biggest problem is that firebug isn't giving me any errors so I don't know where I'm going wrong. If i could just get a hand acquiring the photo ID that would be awesome. I would like to figure the rest out on my own if possible. </p>
  
  <p>EDIT: I'm running this through MAMP so i'm using the url localhost/example.html</p>
  
  <p>Thank you Tamil Selvan, your code allowed me to retrieve value.id. Is there a reason why when I try to retrieve any other data (value.server, value.farm, value.secret) i get a value of "undefined"?</p>
  
  <p>my new code...</p>
  
  <pre><code>         $(document).ready(function() {
           $.get('http://api.flickr.com/services/rest/?&amp;method=flickr.photos.search&amp;tags=thor&amp;api_key=b49d87bfd659c5768ab0eafa74f2b6a5&amp;per_page=10',function(data)
           {
            var items=[];
             $(data).find("photo").each(function(index, value) {
               var ident=(value.id);
               var secret_id=(value.secret);
               var farm_id=(value.farm);
               var server_id=(value.server);
                  $("#target").append("&lt;p&gt;"+ident+" "+server_id+" "+secret_id+" "+farm_id+"&lt;/p&gt;");
               });
               });
               });
  </code></pre>