Handlebars:
Template
{{#with city as | city |}}
  {{#with city.location as | loc |}}
    {{city.name}}: {{loc.north}} {{loc.east}}
  {{/with}}
{{/with}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{
  city: {
    name: "San Francisco",
    summary: "San Francisco is the <b>cultural center</b> of <b>Northern California</b>",
    location: {
      north: "37.73,",
      east: -122.44,
    },
    population: 883305,
  },
}
Output
    San Francisco: 37.73, -122.44
最后更新: 1/11/2020, 3:46:21 PM