I use Wp_query class to query my posts. 15 posts are in a template fetched on page load and their filtering works fine. Infinity scroll fetches for other posts using JSON restful services. The filter on the server side works fine but I don't know how to transfer the logic from the server to a proper query.
Meta_query array passed to Wp_query on the server:
meta_query
0 => array (size=3)
'key' => string 'homepage' (length=8)
'value' => string 'false' (length=5)
'compare' => string 'NOT EXISTS' (length=10)
1 => array (size=2)
'key' => string '_newsml_id' (length=10)
'compare' => string 'NOT EXISTS' (length=10)
'relation' => string 'AND' (length=3)
How to translate that into the query? something like:
/wp-json/posts?filter[meta_query][key]=homepage,_newsml_id&[meta_query][compare]=NOTEXISTS
or
/wp-json/posts?filter[meta_query][key]=homepage&filter[meta_query][key]=_newsml_id&[meta_query][compare]=NOTEXISTS