title: Parse Yahoo Finance Watchlist from a CSV to JSON with jQuery
body: <p>I'd like to use this code to parse JSON data from a Yahoo finance CSV file. The JSON link is valid, I'm just having trouble with the <code>function (data)</code> and <code>var data</code> lines. The parse table calls for <code>function (data)</code> but that conflicts with the <code>var data</code> line. <a href="http://jsfiddle.net/asgallant/dSWe7/" rel="nofollow">The original code</a> I used to parse the table had used <code>function (json)</code>, but this specific api seems to only work with the <code>function (data)</code>.</p>
  
  <pre><code>function drawTable() {
  // use jQuery to make an AJAX request for data
  $.ajax({
      type: "get",
      dataType: "jsonp",
      url: 'https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quoteslist%20where%20symbol%3D%27BRDT%2CAPPL%27&amp;format=json&amp;diagnostics=true&amp;env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&amp;callback=',
      success: function (data) {
          var data = new google.visualization.DataTable();
  
          data.addColumn('string', 'Symbol');
          data.addColumn('number', 'open');
  
  
          // parse the JSON into the DataTable
          for (var i = 0; i &lt; json.list.resources.length; i++) {
  
              var symbol = json.list.resources[i].resource.fields.symbol;
              var open = parseFloat(json.list.resources[i].resource.fields.open);
  
  
              data.addRow([symbol, open]);
          }
  
          var table = new google.visualization.Table(document.querySelector('#table_div'));
          table.draw(data);
      }
  });
  }
  google.load('visualization', '1', {
      packages: ['table'],
      callback: drawTable
  });
  </code></pre>