vars: Variables

View source: R/vars.R

varsR Documentation

Variables

Description

Variables

Usage

vars(.data, ...)

vars_(.data, ..., .dots)

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

x <- '{
 "posts": [
   {"title": "Frist psot", "author": "anon"},
   {"title": "A well-written article", "author": "person1"}
 ],
 "realnames": {
   "anon": "Anonymous Coward",
   "person1": "Person McPherson"
 }
}'

x %>% dotstr(posts[])
x %>% dotstr(posts[]) %>% string
x %>% vars(realnames = names) %>% dotstr(posts[]) %>%
   build_object(title, author = "$names[.author]")

jqr documentation built on Nov. 20, 2023, 5:07 p.m.

Related to vars in jqr...