Hi I create a reactiveValues from a nested list
rv = do.call(shiny::reactiveValues,list(a1=list(b1 = "b1",b2 = "b2"), a2 = "a2"))
which can be accessed easily with
isolate(rv[["a1"]][["b1"]]) # works, returns "b1"
Problem
To access a reactiveValues with character vector doesn't work.
isolate(rv[[c("a1","b1")]]) # Error: Must use single string to index into reactivevalues.
I would like to create a function which allows to access the nested reactiveValues generically:
#' returns value at index
#'
#' @param rv reactiveValues()
#' @param field character vector
#'
#' @return value at index
access_rv = function(rv,field){
# ...
}