title: How to get JSON from URL in JavaScript?
body: <p><a href="http://query.yahooapis.com/v1/public/yql?q=select%20%2a%20from%20yahoo.finance.quotes%20WHERE%20symbol%3D%27WRC%27&amp;format=json&amp;diagnostics=true&amp;env=store://datatables.org/alltableswithkeys&amp;callback" rel="noreferrer">This URL</a> returns JSON:</p>
  
  <pre><code>{
    query: {
      count: 1,
      created: "2015-12-09T17:12:09Z",
      lang: "en-US",
      diagnostics: {},
      ...
    }
  }
  </code></pre>
  
  <p>I tried this, and it didn't work:</p>
  
  <pre><code>responseObj = readJsonFromUrl('http://query.yahooapis.com/v1/publ...');
  var count = responseObj.query.count;
  
  console.log(count) // should be 1
  </code></pre>
  
  <p>How can I get a JavaScript object from this URL's JSON response?</p>