My returning Object from back end is IQueryable<Article>
and Article
has a collection of tags
which is IEnumerable<string>
for example
[
{
id: 'Article 1'
tags : [{'t1','t2','t3'}]
},
{
id: 'Article 2'
tags : [{'t5','t6','t1'}]
},
]
I can filter records by Odata query as below
http://localhost:52475/api/articles?$select=id,tags&$filter=tags/any(item: substringof('j',item) eq true)
Now I want to sort this by $orderBy
I tried below but no chance
http://localhost:52475/api/articles?$select=id,tags&$orderby=tags(item: item)
http://localhost:52475/api/articles?$select=id,tags&$orderby=tags
http://localhost:52475/api/articles?$select=id,tags&$orderby=tags/
http://localhost:52475/api/articles?$select=id,tags&$orderby=tags(item)
I know that if tags collection has another property called name I could use this
http://localhost:52475/api/articles?$select=id,tags&$orderby=tags/name
But it doesn't have , and also I am not able to change backend