data-sly-list iteration for a JsonArray
Hi AEM Gurus,
I have a JSON Array like below sample
{
"sites": {
"label": "Parent LABEL",
"mobileLabel": "Parent Mobile Label",
"items": [
{
"href": "www.google.com",
"id": "goog",
"label": "Google Search"
},
{
"href": "www.yahoo.com",
"id": "yah",
"label": "yahoo site"
},
{
"href": "www.wikipedia.com",
"id": "wiki",
"label": "wikipedia"
}
]
}
}
Now i am trying to Iterate and get the values from this JSON array using data-sly-list something like as shown in below structure
<ul data-sly-list.key="${model.jsonarray}">
<li><a href="${key.href}">${key.label} - ${key.id}</a></li>
</ul>
I know we can iterate Arraylist or a Map object but how do I iterate a JSON array. Please suggest.
Regards,
Rajashankar.R