library(jqr)
library(jsonlite)
library(jsonld)
library(tidyverse)
str <- '[{
    "foo": 1,
    "bar": 2
  },
  {
    "foo": 3,
    "bar": 4
  },
  {
    "foo": 5,
    "bar": 6
}]'
out <- jq(str, ".[]") %>%textConnection() %>% stream_in(simplifyDataFrame=FALSE) 
str(out)
jq(str, "[.[] | {name: .foo} | keys]") -> out
out
out %>%textConnection() %>% stream_in(simplifyVector=TRUE, simplifyDataFrame=FALSE, simplifyMatrix = FALSE) %>% str()


ropenscilabs/datasauce documentation built on May 17, 2022, 4:25 p.m.