I got it. I have to check, if in array is "['meta_query'][0]['value']" set or notthat working :)
add_filter('rest_test_query''rest_myRoute_query', function($args, $request) {
$args['meta_query']$fields = array('myCustomField');
foreach array(
$fields as $field) {
'key' if (! =>empty($request[$field])) 'test_1',{
'value'$args['meta_query'][] =>= esc_sqlarray( $_GET['test_1'] ),
)
'key' => );$field,
//echo $args['meta_query'][0]['value'];
'value' => //print_resc_sql($args$request[$field]);,
if (!empty($args['meta_query'][0]['value'])) {;
return $args; }
}
return $args;
}, 10, 2);