Hi Guys,sorry for the title.
About my problem i added this lines in “class-wp-json-posts.php”
if(isset($filter) && $filter !==”){
$filter = json_decode(stripslashes($filter),true);
}
and i’m using an angularjs ajax method like this
var filter = {};
filter[‘posts_per_page’] = 5;
filter[‘post_type’] = ‘Post’;
filter[‘cat’] = 5;
$http.get(‘https://myhost/wp-json.php/posts’, {params: {“filter”: JSON.stringify(filter)}}).success(function(data) {
//something here
});
this it solve my problem but, is there a better way to use the filter parameter ?
thank’s for all, and sorry again .