title: How do I loop through an array passed directly to dust.js?
body: <p>Using the dust.js javascript templating engine, I want to pass an array directly:</p>
  
  <pre><code>var templateContents; //loaded by require.js
  var compiled = dust.compile(templateContents, "viewElements");
  dust.loadSource(compiled);
  dust.render("viewElements", ["bob", "joe", "sue"], function(err, out){
      $('#view').html(out);
  });
  </code></pre>
  
  <p>How do I create a template file to handle an array directly? I've tried a number of things including:</p>
  
  <pre><code>{.}&lt;br&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>{#.}
   {.}
  {/.}
  </code></pre>
  
  <p>But can't seem to reference the array or the elements in it correctly. The first example prints: [object Object]</p>
  
  <p>I could name each array that I pass in, but what I'm trying to avoid having to do that as the arrays are actually coming from backbone collections and it seems like extra work to do so.</p>