In jsreport I can`t find built-in helper like "{{#FOR}}{{/#FOR}}"
This is mainly handlebars topic.
You should typically find answers when googling "handlebars something something", because there is like thousand times more handlebars users and resources.
However...
You can for example add a condition inside the each.
{{#each items}}
{{#if (itemOk this)}}
ccc
{{/if}}
{{/each}}
Or you can implement a helper, that will filter the inputs and returns the final data set for each.
{{#each (myDataFilter items}}
{{/each}}
Or you can implement your own each.