title: JQuery $.getJSON Not Running
body: <p>I'm a J Query beginner. Need some help with the $.getJSON function. I am trying to retrieve data from an outside server using this function but when I run it, I get nothing. I've been through countless tutorials. Heres my code sample...</p>
  
  <pre><code>    &lt;script src="//code.jquery.com/jquery-1.11.2.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          var url='https://api.flightstats.com/flex/airports/samples/v1/lts/Airport_response.json';
          $('#button').click(function(){
              $.getJSON(url,function(json){
                  $("#results").append(json.airport.name);
              });     
          });
      });
      &lt;/script&gt;
  
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="button" id="button" value="Go"&gt;
      &lt;div id="results"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>and heres the JSON file content..</p>
  
  <pre><code>{
  "airport":
          {
      "fs":"PDX",
      "iata":"PDX",
      "icao":"KPDX",
      "faa":"PDX",
      "name":"Portland International Airport",
      "street1":"7000 NE Airport Way",
      "city":"Portland",
      "cityCode":"PDX",
      "stateCode":"OR",
      "postalCode":"97218",
      "countryCode":"US",
      "countryName":"United States"
          }
  
          }
  </code></pre>
  
  <p>Im just trying to grab the 'name' content. Is $.getJSON the correct function or should I use $.ajax or $.get?
  Thanks</p>