Handlebars:
Template
{{#each people}}
   {{print_person}}
{{/each}}
Preparation-Script
Handlebars.registerHelper('print_person', function () {
    return this.firstname + ' ' + this.lastname
})
Input
{
  people: [
    {
      firstname: "Nils",
      lastname: "Knappmeier",
    },
    {
      firstname: "Yehuda",
      lastname: "Katz",
    },
  ],
}
Output
   Nils Knappmeier
   Yehuda Katz