Sort json response in slightly

Avatar

Avatar

sathya_prakasha

Avatar

sathya_prakasha

sathya_prakasha

15-12-2017

Hi,

I am getting list of books from third party services.

Wanna list the books in sorting order like ASC using slightly. is it possible..?? I am able to get the results but not in sorting order..

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

edubey

Total Posts

1.5K

Likes

264

Correct Answer

392

Avatar

edubey

Total Posts

1.5K

Likes

264

Correct Answer

392
edubey

15-12-2017

As of now sightly does not support list sorting.

Backend call to 3rd party -  Process this in sling model

Frontend call to 3rd party - Use JS

Answers (2)

Answers (2)

Avatar

Avatar

Veena_Vikraman

Avatar

Veena_Vikraman

Veena_Vikraman

15-12-2017

Satya,

       HTL is a template language and cannot do much of data manipulation . So as Simone said you have to handle it either in client-side or server side . Getting Started with HTL 

Avatar

Avatar

simoneb20672152

Avatar

simoneb20672152

simoneb20672152

15-12-2017

If you are retrieving the json clientside you need to sort it by javascript.

If you are retrieving serverside, you need to sort your list before listing with sightly markup (with JS or Java API you are using)