I'm new to Freemarker and currently I'm stuck on getting nested output for metalsElements
metals =
{
"name": "BRONZE",
"state": "SOLID",
"density": 25,
"price": 120,
"rarity": "COMMON",
"metalsElements": [
{
"metalsInfoId": 30,
"element": "copper",
"percentage": "87",
"id": 26
},
{
"metalsInfoId": 30,
"element": "tin",
"percentage": "12",
"id": 27
},
{
"metalsInfoId": 30,
"element": "nickel",
"percentage": "1",
"id": 28
}
],
"id": 30
}
I've tried using the codes below but still haven't successful
<ul>
<#list metals.metalsElements as key>
<li>${key}</li>
</#list>
</ul>
and
<ul>
<#list metalsElements as key,val>
<li>${key}</li>
</#list>
</ul>
Anybody has the solution? Thanks