title: wp.template for front end templating in WordPress how to write for each loop
body: <pre><code>&lt;# if ( data.trueValue ) { #&gt;     &lt;p&gt; I am only output if &lt;code&gt;data.trueValue&lt;/code&gt; is true.   &lt;# } #&gt;
  </code></pre>
  
  <p>As shown above iam able to write if condition outputting the result that is generated by wp.template() and my question is how can i write for each loop for the same if i want to loop through the data.</p>