Your array splits like this
Your array has one element, this is the element with 'pa_vendor' as index.
It can be accessed by using
$arr['pa_vendor']
$arr['pa_vendor']
is een array with two elements
first element has index 'terms' and is an array
second element has index 'query_type' and is a string.
These can be accessed by using
$arr['pa_vendor']['terms']
and
$arr['pa_vendor']['query_type']
$arr['pa_vendor']['terms']
is an array with one element
this element has index '0' and is a number
this element can be accessed by using
$arr['pa_vendor']['terms'][0]