Try this way:
$args = array(
'orderby' => 'date',
'order' => 'DESC',
'post_status' => 'publish'
);
if ( isset( $_POST['typefilter'] ) && $_POST['typefilter'] !== '' ) {
$args['post_type'] = 'post_type_x';
$args['tax_query'][0]['taxonomy'] = 'type_emp';
$args['tax_query'][0]['field'] = 'id';
$args['tax_query'][0]['terms'] = $_POST['typefilter'];
$args['tax_query'][0]['operator'] = 'IN';
}
if ( $_POST['typefilter'] == '') {
$args['post_type'] = 'post_type_x';
}
// If two or more options are selected they are sorted below
$query = explode('&', file_get_contents("php://input"));
$params = array();
foreach( $query as $param )
{
list($name, $value) = explode('=', $param, 2);
$params[urldecode($name)][] = urldecode($value);
}
if( isset( $params['statusfilter'] ) && $_POST['statusfilter'] !== '' ) {
$args['tax_query'][1]['taxonomy'] = 'status_emp';
$args['tax_query'][1]['field'] = 'id';
$args['tax_query'][1]['terms'] = $params['statusfilter'];
$args['tax_query'][1]['operator'] = 'IN';
}
// for taxonomies / categories
if( isset( $_POST['cityfilter'] ) && $_POST['cityfilter'] !== '') {
$args['tax_query'][2]['taxonomy'] = 'city_emp';
$args['tax_query'][2]['field'] = 'id';
$args['tax_query'][2]['terms'] = $_POST['cityfilter'];
$args['tax_query'][2]['operator'] = 'IN';
}
$query = new WP_Query($args);
I haven’t tested it but theoretically it should work :), tell me if it works or if you need more help