micha80
10 years agoExpert
How to iterate through rest api result
Hi all, I have tried a lot and now I am stuck. I loaded the user data from the following V1 Rest API Call: rest(/users/id/XXX?restapi.response_style=view").response.user Then I want to ac...
- 10 years ago
Hi micha80
have a look at the below sample code:
<#assign test = rest("/users/self?restapi.response_style=view").user /> <ul> <#list test.profiles.profile as prf> <li>Profile '${prf.@name}' : ${prf}</li> </#list> </ul>
It will generate a list of all the key/value pairs for the currently logged in user (REST v1)
Hope it helps,