xxxxxxxxxx
let input = `{
rules: [
{
{{#each hosts}}
host: "{{this}}"
http: {
{{#each ../paths}}
paths: [
{
pathType: "prefix"
path: "{{this}}"
}
]
{{/each}}
},
{{/each}}
}
]
}`
let template = handlebar.compile(input)
let output = template({ hosts: ['a', 'b', 'c'], paths: ['/a'] })