<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Run time argument to #each helper in handlebars]]></title><description><![CDATA[<p>Is it possible to feed a function to the #each helper. I want to do something like this:</p>
<pre><code>{{#each item}}
&lt;li&gt;item.name&lt;/li&gt;
{{/each}}
****************
function item(){
 let x = []
x.push({name: &quot;joe&quot;})
x.push({name:&quot;david&quot;})
return x
}
</code></pre>
<p>thanks</p>
]]></description><link>https://forum.jsreport.net/topic/2612/run-time-argument-to-each-helper-in-handlebars</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 06:10:35 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/2612.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Nov 2022 16:42:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Run time argument to #each helper in handlebars on Invalid Date]]></title><description><![CDATA[<p>Is it possible to feed a function to the #each helper. I want to do something like this:</p>
<pre><code>{{#each item}}
&lt;li&gt;item.name&lt;/li&gt;
{{/each}}
****************
function item(){
 let x = []
x.push({name: &quot;joe&quot;})
x.push({name:&quot;david&quot;})
return x
}
</code></pre>
<p>thanks</p>
]]></description><link>https://forum.jsreport.net/post/11327</link><guid isPermaLink="true">https://forum.jsreport.net/post/11327</guid><dc:creator><![CDATA[duncanelliot]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Run time argument to #each helper in handlebars on Invalid Date]]></title><description><![CDATA[<p>hi <a class="plugin-mentions-a" href="https://forum.jsreport.net/uid/2461">@duncanelliot</a> yes, it is possible, you have to use a <a href="https://handlebarsjs.com/guide/expressions.html#subexpressions" rel="nofollow">handlebars sub-expression</a> for that. <code>{{#each (item)}}</code></p>
<p>example: <a href="https://playground.jsreport.net/w/anon/QgGCn7O8" rel="nofollow">https://playground.jsreport.net/w/anon/QgGCn7O8</a></p>
]]></description><link>https://forum.jsreport.net/post/11328</link><guid isPermaLink="true">https://forum.jsreport.net/post/11328</guid><dc:creator><![CDATA[bjrmatos]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Run time argument to #each helper in handlebars on Invalid Date]]></title><description><![CDATA[<p>Legend!</p>
]]></description><link>https://forum.jsreport.net/post/11330</link><guid isPermaLink="true">https://forum.jsreport.net/post/11330</guid><dc:creator><![CDATA[duncanelliot]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>