dig: Dig into a JSON data frame.

Description Usage Arguments Examples

Description

Dig into a JSON data frame.

Usage

1
dig(jsondata, keyname, rs = FALSE)

Arguments

jsondata

data.frame Data frame output from reading a JSON array data into R using jsonlite::fromJSON.

keyname

character A key name to dig into jsondata.

rs

logical Short for return summary. Should dig return the data or a summary of the data?

Examples

1
2
3
4
5
6
library(jsonlite)
library(dplyr)
jsondata <- fromJSON("https://api.github.com/users/hadley/repos", flatten = FALSE)
jsondata %>% dig("owner") %>% dig("type")
jsondata %>% dig("owner", rs= T)
jsondata %>% dig("owner") %>% fetch()

sctyner/JSOmetaN documentation built on May 30, 2019, 10:36 p.m.