title: Load ajax/jquery JSON array into Twig Template
body: <p>I am currently building a program using Symfony2 framework and also taking advantage of the many nice new features that come with the platform such as Doctrine, Twig etc.</p>
  
  <p>One of my pages requires me to load  a big load of data via AJAX after pageload is complete. This is easily achieved uing JQuery/Ajax but i'd like to think that something like this would have a way of injecting ajax directly into the Twig template maybe via JSON and have it populate in a for loop.</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;&lt;td&gt;header&lt;/td&gt;&lt;/tr&gt;
  {% for row in rows %}
      &lt;tr&gt;&lt;td&gt;{{row.data}}&lt;/td&gt;&lt;/tr&gt;
  {%endfor%}
  &lt;/table&gt;
  </code></pre>
  
  <p>Something like this crude example.</p>
  
  <p>I did browse the docs quickly for this but there search is down and i couldn't find anything directly. A link to documentation could suffice if its what im looking for.</p>