title: passing values from django to google charts DataTable
body: <p>I'm trying to pass a variable from my django view to javascript as a 2d array so I can populate a google charts DataTable.</p>
  
  <p>can someone please explain why this works:</p>
  
  <pre><code>var data=new google.visualization.arrayToDataTable([[1,2,3],
                                                      [4,5,6]])
  </code></pre>
  
  <p>but this does not:</p>
  
  <pre><code>foo = [[1,2,3], [4,5,6]]
  foo = json.dumps(foo) # the foo stuff is in the django view. i'm just trying to be clear as to what foo is.
  
  var data=new google.visualization.arrayToDataTable({{ foo|safe }})# i've tried this with quotes and without safe. both as json and not. 
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre><code>foo = [json.dumps(i) for i in foo]
  </code></pre>
  
  <p>I've tried no json at all. I've tried passing numpy arrays, tuples. I've tried to populate the DateTable using <code>data.addRows</code> and I've tried iterating through and using <code>data.addRow</code>. Along with 100 other things...</p>
  
  <p>I'm obviously missing something important because nothing I'm doing works.</p>
  
  <p>Why when I hard code the data for the DataTable does it work but when I try to pass that same data from my django view it fails??</p>
  
  <p>Any help would be appreciated because I'm about out of blue google links...</p>