title: passing an array from express to jade client side javascript
body: <p>I have this jade template:</p>
  
  <pre><code>html
    head
      script(type="text/javascript" src="https://www.google.com/jsapi")
      script(type='text/javascript')
        google.load("visualization", "1", {packages:["corechart"]});
        google.setOnLoadCallback(drawChart);
        function drawChart() {
        var data = google.visualization.arrayToDataTable([
        ['Date', 'Tin_A' ],
  
         - each datapoint in myData
              "[" + datapoint.date + "," + datapoint.value + "],"
  
        ]);
        var options = {
        title: 'bla'
        };
        var chart = new google.visualization.LineChart(document.getElementById('chart_line'));
        chart.draw(data, options);
        }
  
  
    body
      h1= title
      #chart_line
  </code></pre>
  
  <p>and I'm using this call to render the jade template in express/node.js:</p>
  
  <pre><code>app.get('/', function(req, res){
    sensors.findSensorAllData(2, 2, function (error,emps){
          console.log(emps);
          res.render('tmp', {
              title : 'Temperatures in a row',
              myData : emps
          });
      });
  });
  </code></pre>
  
  <p>the output of the <code>console.log(emps)</code> is:</p>
  
  <pre><code>[ { _id: 524b8642028e167fb0e3661d,
      sensor_id: 2,
      value: 49,
      date: Tue Oct 01 2013 20:34:40 GMT-0600 (CST) },
    { _id: 524b863d028e167fb0e3661c,
      sensor_id: 2,
      value: 19,
      date: Tue Oct 01 2013 20:34:35 GMT-0600 (CST) } ]
  </code></pre>
  
  <p>after the rendering occour, I expect to have the values within the javascrip in the jade template... but It won't work. I get only the same lines in plain text, as if the line <code>- each datapoing in myData</code> would have no meaning... what am I doing wrong? Thanks</p>
  
  <p>--- Edit: 
  Everything works fine if I replace the lines </p>
  
  <pre><code>- each datapoint in myData
              "[" + datapoint.date + "," + datapoint.value + "],"
  </code></pre>
  
  <p>with </p>
  
  <pre><code>  ['2004',  20],
    ['2005',  30],
    ['2006',  40]
  </code></pre>