func (d *Decoder) Query(query string) ([]interface{}, error) {
	res := queryResult{
		query: query,
	}
	if err := d.query(&res); err != nil {
		return nil, err
	}
	return res.values, nil
}
Query extracts field specified by the query from the msgpack stream ignoring
any other fields. Query string consists of map keys and array indexes
separated with dot, e.g. `key1.0.key2`.
package msgpack
import (
	"fmt"
	"strconv"
	"strings"
	"gopkg.in/vmihailenco/msgpack.v2/codes"
)
type queryResult struct {
	query       string
	key         string
	hasAsterisk bool
	values []interface{}
}
func (q *queryResult) nextKey() {
	ind := strings.IndexByte(q.query, '.')
	if ind == -1 {
		q.key = q.query
		q.query = ""
		return
	}
	q.key = q.query[:ind]
	q.query = q.query[ind+1:]
}