R/paths.R

Defines functions paths

Documented in paths

#' Outputs paths to all the elements in its input
#'
#' @export
#' @param .data input
#' @examples
#' '[1,[[],{"a":2}]]' %>% paths
#' '[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]' %>% paths
paths <- function(.data) {
  pipe_autoexec(toggle = TRUE)
  dots <- comb(tryargs(.data), structure('paths', type = "paths"))
  structure(list(data = getdata(.data), args = dots), class = "jqr")
}

Try the jqr package in your browser

Any scripts or data that you put into this service are public.

jqr documentation built on Sept. 11, 2024, 8:21 p.m.