Simple list
The loop should have a a JSON array strcuture, i.e. : be embedded in [ ] and contain key/ value pairs inside { } , as shown below :
{
"cars" : [
{"brand" : "Renault"},
{"brand" : "Tesla" },
{"brand" : "Toyota" }
]
}As the loop contains only one element, we can use a dot tag {.} to create a list.
Template
Result
{#cars}
- {.}
{/cars}
➡️
Renault
Tesla
Toyota
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}
- {brand}
{/cars}
➡️
Renault
Tesla
Toyota
Last updated