I'm trying to convert a Json output to a data frame. The Json output is as follows
[[1]]
[[1]]$id
[1] "176248"
[[1]]$report_list_id
[[1]]$report_list_id[[1]]
[1] "183556"
[[1]]$name
[1] "Torchy's Tacos"
[[2]]
[[2]]$id
[1] "180642"
[[2]]$report_list_id
[[2]]$report_list_id[[1]]
[1] "188160"
[[2]]$name
[1] "CircusTrix"
The code that I'm using is as follows
library(jsonlite)
library(httr)
library(RJSONIO)
x= content(dash)$data
xx <- data.frame(do.call(rbind, x))
However, this code does not unlist some columns and the resulting df looks like this.
id
report_list_id
name
1
176248
list("183556")
Torchy's Tacos
2
180642
list("188160")
CircusTrix
Is there a better way to convert the Json to a DF avoiding issues like these.