I want to get a V1 API call back in a format that I can use as JSON in Javascript in a component. How do I do that? For example:
(/categories/id/categoryName/labels)
<#assign someLabels = restadmin("/${context}/id/${contextId}/labels?restapi.response_format=json").labels.label?sort_by("text")/>
<script>
let someVar = [${someLabels}];
</script>
I know that V2 has the apiv2.toJson() method, but in this case V1 is the only way I know of to get a list of labels from a category, for example.
Solved! Go to Solution.
Thanks for all your help. Shouldn't have been that hard to begin with but ... some things are just a pain in Khoros Community... Thanks
Welcome to the Technology board!
Curious about our platform? Looking to connect on social technology? You've come to the right place!