WordPress ajax filter returning all posts when it should be filtering by category

It works in my project

 if (!empty($Value)){
                $meta_array = array('relation'=>'OR');
                foreach ($Value as $key => $Inkey ) {
                    array_push($meta_array,
                        array(
                            'key' => 'your_key',
                            'value' => $value->term_id,
                            'compare' => 'EXISTS'
                        )
                    );
                }
            }