I have a table named views.
this table has "post id" and "views"
I’ve added views for each post to my custom post type rest-API.
I want to order the rest-API posts by views.
I’ve found this topic that shows how to order the rest-API posts by meta value:
https://stackoverflow.com/questions/44783932/wp-rest-api-orderby-meta-value
but I want to order by a field that’s not in the postmeta table.
Please tell me how can I do this.