#' @import rlang
get_list_item <- function(l, index, get_name = FALSE, default = "") {
if (length(index) == 1) {
if (get_name) {
return(names(l[index[[1]]]) %||% default)
} else {
return(l[[index[[1]]]])
}
} else {
return(get_list_item(l[[index[[1]]]], index[-1], get_name, default))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.