Hi,
I have used the query service and successfully get the results shown in my app.
But all results are shown from oldest date to latest date. I want to put the latest result in the top of the list. How can I make it happen?
Please help.
Hi,
I have used the query service and successfully get the results shown in my app.
But all results are shown from oldest date to latest date. I want to put the latest result in the top of the list. How can I make it happen?
Please help.
Hi AC -
Add sort parameter to the service and by default place "-createdAt" value(without "" of course).
Hi MM, thx for the helping. After setting in the request section. Should I also map something new in the response section. I post a snapshot below, please help
the second step- put "-" in front of col name. Do u mean sort the col in the database? Or I need to make some setting in the response mapping?
Nope you don't have to do any additional mapping for sorting. Just need to add "sort" parameter and on the right side add the column name, in your case createdAt. In case you want to sort in descending order then use -createdAt
You just need to follow this picture
https://d2r1vs3d9006ap.cloudfront.net...
Made it happen! Thx a lot MM!