template

Render each array item with a small ${property} template.

Syntax

{{ value | template:"${name}" }}

Example

01

Basic usage

InputTS
1{2  "people": [3    {4      "name": "Ada",5      "role": "Engineer"6    },7    {8      "name": "Lin",9      "role": "Designer"10    }11  ]12}
TemplateKNAP
1{{ people | template:"${name} — ${role}" }}
OutputKNAP
1AdaEngineer23LinDesigner

Behavior

  • The template parameter can reference nested object properties. Items are separated by a blank line.