Handlebars:
Template
{{!-- wrong: {{array.0.item}} --}}
correct: array.[0].item: {{array.[0].item}}

{{!-- wrong: {{array.[0].item-class}} --}}
correct: array.[0].[item-class]: {{array.[0].[item-class]}}

{{!-- wrong: {{./true}}--}}
correct: ./[true]: {{./[true]}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{
  array: [
    {
      item: "item1",
      "item-class": "class1",
    },
  ],
  true: "yes",
}
Output
correct: array.[0].item: item1

correct: array.[0].[item-class]: class1

correct: ./[true]: yes
마지막 업데이트: 2024. 6. 5. 오후 11:37:24