Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

Getting an API V1 call into JSON I can use in Javascript?

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:


<#assign someLabels = restadmin("/${context}/id/${contextId}/labels?restapi.response_format=json").labels.label?sort_by("text")/>
let someVar = [${someLabels}];

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. 

20 Replies 20
Not applicable

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!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.