Elasticsearch Data Analysis with R

Thanks for the reply.
To try out your suggestion about playing with fromJSON
jsonlite::fromJSON(res, asdf, flatten = TRUE)

how do I get res in txt format. I know how to do it using raw=TRUE. This does seem to work (as I sent in earlier mil)