title: express.js - render the full data
body: <p>I am trying to render a array of object (highcharts points). The data should be fine, but when I try to render, I get <code>[object Object]</code> instead of the data themselves.</p>
  
  <p><code>JSON.stringify()</code> doesn t go well with HTML.</p>
  
  <p><code>util.inspect</code>, doesn t either, and add data. </p>
  
  <p><code>toString()</code> give me the same as the rendering.</p>
  
  <p>I don t know what else to try, what I m trying to send is data for a highchart graphic.</p>
  
  <p>Minimal example:</p>
  
  <p>app.js:</p>
  
  <pre><code>var express = require('express'),
      app = express();
  
  app.listen(8080);
  
  app.get('/', function (req, res) {
      var view = 'test.ejs',
          theme = [{name: '1', y: 5}, {name: '2', y: 2}];
  
      res.render(view, {theme: theme});
      console.log('ok');
  });
  </code></pre>
  
  <p>theme_days.ejs:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;script type="text/javascript"&gt;
              &lt;%= theme %&gt;
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Result (as if, <code>toString()</code>):</p>
  
  <pre><code>[object Object],[object Object]
  </code></pre>
  
  <p>Result with <code>JSON.stringify()</code>:</p>
  
  <pre><code>[{&amp;quot;name&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;y&amp;quot;:5},{&amp;quot;name&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;y&amp;quot;:2}]
  </code></pre>
  
  <p>Result with <code>util.inspect</code>:</p>
  
  <pre><code>[ { name: &amp;#39;1&amp;#39;, y: 5 }, { name: &amp;#39;2&amp;#39;, y: 2 } ]
  </code></pre>
  
  <p>EDIT:
  I now understand that what s happenning is that <code>'</code> is escaped to html, is there a way to prevent that?</p>