I have some custom taxonomy for regions.
Commonly it would look something like this.
USA (parent) - Arizona (child 1) - - Phoenix (child 2)
however, there will be cases where it will only be like
USA - Arizona
UK - Wales
and maybe even just
In my for loop I get the taxonomy data as
$location = get_the_terms( $id, 'listings_region' );
and then in the html/php I can simply write
$location->name and then I get the the name of the first object in the array.
I have however noticed that the taxonomy comes back not in the correct hierarchy - instead, alphabetically.
echo '<pre>'; print_r($location); echo '</pre>', I get the array and  would be Arizona and  would be USA.
How can I retrieve it the taxonomy array in the correct order so that ideally  is always the parent,  is the first child, etc?
Thanks in advance.