API: Allow sort by nested property (M2O) #4502
Replies: 3 comments 7 replies
-
You're correct, this is not currently possible.
I agree! It feels like a common use case, though funnily enough you're the first person to bring it up 🤔 |
Beta Was this translation helpful? Give feedback.
7 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
This has since been implemented! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone,
I'm trying to sort the items of a collection based on the numeric value of a nested property.
Example:
Apple
collection with property:apple_category
(M2O)AppleCategory
collection with property:price
(int)Now using the
items/apples/
endpoint, I want the apples sorted by their category price.What I tried:
Which returns a
500 Internal Server Error
side note: I also tried using
deep
as a user suggested, but it didn't work (and I want to sort the apples, not the apple_categories)Don't know if I'm missing something but if that's already possible please tell me how :)
And if not, then take this as a feature suggestion, because this should be a rather common use-case.
Directus Version: 9.0.0-rc.49
Beta Was this translation helpful? Give feedback.
All reactions