WP Tax query & order by tax query not working

Here’s an example of working tax_query.

The problem I’ve run into with tax_query is forgetting to nest the array (i.e. ‘tax_query’ is array(array(…)). If you don’t do that, it does not work.

$args = array(
    'post_type' => $post_type,
    'posts_per_page' => -1,  //show all posts
    'tax_query' => array(
         array(
            'taxonomy' => $taxonomy,
             //'field' => 'slug',
             //'terms' => $term->slug,
             'field' => 'term_id',
             'terms' => array([your values]),
          )
     )
 );