#each
The #each node iterates over an array from the payload and creates instances of the file (or folder) for each entry. A new payload is created for each instance by merging the current entry value into the root payload. Also, the created payload is used to render with Handlebars.
- Input
- Payload
- Output
{#each persons}{name}.txt
In {{title}}, {{name}} is given the age of {{age}} years.
{
"title": "Shakespeare's original story",
"persons": [
{ "name": "Romeo", "age": 16 },
{ "name": "Juliet", "age": 13 }
]
}
Romeo.txt
In Shakespeare's original story, Romeo is given the Age of 16 years.
Juliet.txt
In Shakespeare's original story, Juliet is given the Age of 13 years.