i have 3 custom post type : artists, songs, videos songs and videos have a meta that sort artist id of songs or videos filter in rest api couldn't return filtered post by artist id custom meta
so i have to return that by custom function and show it in rest api
how create a function that compare value of artist id meta and return post that have specific artist id ?
something like this : /wp-json/wp/v2/songs?artist=4438 that return songs that meta value of artist is 4438
thanks