Get JSON into R

Example.

json <- '[
  {"name": "John", "age": 34},
  {"name": "Susan", "age": 27}
]'
df <- tibble(json = parse_json(json))
df
## # A tibble: 2 × 1
##   json            
##   <list>          
## 1 <named list [2]>
## 2 <named list [2]>
df |> 
  unnest_wider(json)
## # A tibble: 2 × 2
##   name    age
##   <chr> <int>
## 1 John     34
## 2 Susan    27