Handlebars:
Template
{{#each people}}
   {{.}} lives in {{lookup ../cities @index}}
{{/each}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{
  people: ["Nils", "Yehuda"],
  cities: [
    "Darmstadt",
    "San Francisco",
  ],
}
Output
   Nils lives in Darmstadt
   Yehuda lives in San Francisco
最后更新: 1/11/2020, 3:46:21 PM