Site icon Hip-Hop Website Design and Development

Order by slug in get_terms with multiple taxonomies

I am builing a search engine where I need to search in 2 different taxonomies and sort them by slug. I got this code to do so.

$search = sanitize_text_field( $_POST[ 'search' ] );
$content = '';
$terms = get_terms(array(
    'taxonomy' => array('apartments','houses'),
    'search' => $search,
    'orderby' => 'name',
    'order'             => 'DESC',
    'hide_empty' => true
));

Right now the result is:

and i would like it to be like that:

Any idea as I run out of at the moment 😉
I would like to avoid JS at that moment.