How can I sort objects by date inside kinveyRef dictionary ?
Thank You
Best Answer
K
Kinvey Support
said
almost 5 years ago
Hi, searching or sorting on data inside an object referenced by a KinveyRef is not currently supported. You could either sort on the client side after receiving the response, or write a Business Logic post-fetch hook to do the same.
let dataSort = KCSQuerySortModifier(field: "_kmd.lmt", inDirection: KCSSortDirection.Descending) query.addSortModifier(dataSort)
store.queryWithQuery( query,…
Thanks, Pranav Kinvey Support
B
Book Around
said
almost 5 years ago
Thank you Pranav, but your solution didn't help me.
W
Wood Wayfarer
said
almost 5 years ago
Thank you Pranav, but your solution didn't help me.
K
Kinvey Support
said
almost 5 years ago
Answer
Hi, searching or sorting on data inside an object referenced by a KinveyRef is not currently supported. You could either sort on the client side after receiving the response, or write a Business Logic post-fetch hook to do the same.
Wood Wayfarer
How can I sort objects by date inside kinveyRef dictionary ?
Thank You
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstPranav J
Let me know if this works.
let dataSort = KCSQuerySortModifier(field: "_kmd.lmt", inDirection: KCSSortDirection.Descending)
query.addSortModifier(dataSort)
store.queryWithQuery(
query,…
Thanks,
Pranav
Kinvey Support
Book Around
Thank you Pranav, but your solution didn't help me.
Wood Wayfarer
Thank you Pranav, but your solution didn't help me.
Kinvey Support
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics