title: Dust.js and tables
body: <p>I am new to Dust.js and am trying to iterate a JSON object with  records and render each of them into a row within a table. Below is the script, I am using to render the table, but am running into issues, I guess while rendering, especially the template argument of the render function. Appreciate if I could be pointed in the right direction</p>
  
  <pre><code>&lt;div id="dustPlaceholder"&gt;&lt;/div&gt;  
      &lt;script id="goalTemplate"&gt;
          &lt;table id="dustGoals"&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Name&lt;/th&gt;
                      &lt;th&gt;Age&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  {#friends}
                  &lt;tr&gt;
                      &lt;td&gt;{name}&lt;/td&gt;
                      &lt;td&gt;{age}&lt;/td&gt;
                  &lt;/tr&gt;
                  {/friends}
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/script&gt; 
      &lt;/div&gt;
  
       &lt;script type="text/javascript"&gt;
           var src = document.getElementById("goalTemplate").innerHTML;
           var compiled = dust.compile(src);
           dust.render("goalTemplate", { friends: [ { name: "Moe", age:  37}]}, 
           function(err, out) {
            document.getElementById('dustPlaceholder').innerHTML = out;
          });   
       &lt;/script&gt;
  </code></pre>