Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?

This are my current parameters for WP_Query:

array(5) {
  ["posts_per_page"]=>
  int(6)
  ["orderby"]=>
  array(2) {
    ["uss_product_price"]=>
    string(3) "ASC"
    ["uss_product_weight"]=>
    string(4) "DESC"
  }
  ["meta_query"]=>
  array(3) {
    ["relation"]=>
    string(3) "AND"
    ["sortprimary_clause"]=>
    array(2) {
      ["key"]=>
      string(17) "uss_product_price"
      ["compare"]=>
      string(6) "EXISTS"
    }
    ["sortsecondary_clause"]=>
    array(2) {
      ["key"]=>
      string(18) "uss_product_weight"
      ["compare"]=>
      string(6) "EXISTS"
    }
  }
  ["paged"]=>
  string(1) "1"
  ["post_type"]=>
  string(7) "product"
}

This new kind of orderby was introduced in WordPress 4.0 and 4.2:

A more powerful ORDER BY in WordPress 4.0


https://make.wordpress.org/core/2015/03/30/query-improvements-in-wp-4-2-orderby-and-meta_query/

The query basically works however the products are ordered by the string value of uss_product_price and uss_product_weight. Previously this problem was solved by giving meta_value_num instead of meta_value in WP_Query:
https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

I want the result to be ordered by the numeric value of uss_product_price (first) and uss_product_weight (second). How can I tell the query to use the numeric value while still using the complexity of multiple orderby parameters?

Solutions Collecting From Web of "Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?"

Boohoo why did I start a bounty for that 😉 The answer is pretty simple – add ‘type’ => ‘numeric’ to the meta query.

array(5) {
  ["posts_per_page"]=>
  int(6)
  ["orderby"]=>
  array(2) {
    ["uss_product_price"]=>
    string(4) "DESC"
    ["uss_product_weight"]=>
    string(4) "DESC"
  }
  ["meta_query"]=>
  array(3) {
    ["relation"]=>
    string(3) "AND"
    ["sortprimary_clause"]=>
    array(3) {
      ["key"]=>
      string(17) "uss_product_price"
      ["compare"]=>
      string(6) "EXISTS"
      ["type"]=>
      string(7) "numeric"
    }
    ["sortsecondary_clause"]=>
    array(2) {
      ["key"]=>
      string(18) "uss_product_weight"
      ["compare"]=>
      string(6) "EXISTS"
    }
  }
  ["paged"]=>
  string(1) "1"
  ["post_type"]=>
  string(7) "product"
}