Simple list
Last updated
Last updated
The loop should have a a JSON array strcuture, i.e. : be embedded in [ ]
and contain key/ value pairs inside { }
, as shown below :
As the loop contains only one element, we can use a dot tag {.}
to create a list.
If the data loop contained more than 1 item type, then we would have to specify which data we want to display, with this tag :{brand}
:
Template
Result
{#cars}
- {.}
{/cars}
Renault
Tesla
Toyota
Template
Result
{#cars}
- {brand}
{/cars}
Renault
Tesla
Toyota