To unwrap a nested structure of the tree class, we will use a simple .map() call:
yahooService.yqlQuery(query, env)
.subscribeOn(Schedulers.io())
.map(r -> r.getQuery().getResults().getQuote())
This .map() call will transform all YahooStockResult (because it is what YahooService returns) objects into List<YahooStockQuote> (as it is the result of .getQuote()).