recurse: Search through a recursive structure - extract data from all...

Description Usage Arguments Examples

View source: R/recurse.R

Description

Search through a recursive structure - extract data from all levels

Usage

1
2
3

Arguments

.data

input. This can be JSON input, or an object of class jqr that has JSON and query params combined, which is passed from function to function when using the jqr DSL.

...

Comma separated list of unquoted variable names

.dots

Used to work around non-standard evaluation

dots

dots

Examples

1
2
3
4
5
6
7
8
9
x <- '{"name": "/", "children": [
  {"name": "/bin", "children": [
    {"name": "/bin/ls", "children": []},
    {"name": "/bin/sh", "children": []}]},
  {"name": "/home", "children": [
    {"name": "/home/stephen", "children": [
      {"name": "/home/stephen/jq", "children": []}]}]}]}'
x %>% recurse(.children[]) %>% build_object(name)
x %>% recurse(.children[]) %>% build_object(name) %>% string

ropensci/jqr documentation built on Oct. 26, 2018, 7:15 p.m.