working with json data

working with json data

I am using youtube url to get json and data  and save it  ina  varaible to use it later .

here is my code

  1.     var myObject;
  2.     $.getJSON("https://gdata.youtube.com/feeds/api/videos/SPtEUAFm6Yk?v=2&alt=json", function( data ) {
  3.         myObject=data;
  4.        console.log(myObject.entry.content.src);
  5.     });
  6.     console.log(myObject.entry.content.src);
inside the callback function I can iterate the  myObject and get all the properties but outside the function it sayas  undefined. Please advice once we get json data back , can I  save it in some other object for use later?