The code inside {{#foods}} doesn't work and I don't know what to do.
<div class="container">
<div class="options">
{{#meal}}
<h3>Select the food you want to add to {{name}}</h3>
<div class="options-items">
{{#foods}}
<a class="test" href="http://localhost:8000/dashboard/add/{{meal.id}}">
{{foods.name}}
</a>
{{/foods}}
</div>
{{/meal}}
</div>
</div>
This is my context data:
{
"meal":
[{
"id":2,
"name":"Lunch"
}],
"foods":
[{
"id":1,
"name":"Banana",
"kcal":89,
"carb":22.84,
"prot":1.09,
"fats":0.33
},
{
"id":2,
"name":"Chicken",
"kcal":144,
"carb":0,
"prot":21,
"fats":2.6
},
{
"id":3,
"name":"Milk",
"kcal":47,
"carb":4.9,
"prot":3.3,
"fats":1.6
}]
}