I have a json list that its saved as text, and i'm trying to convert it into a data frame.List looks like that:
`{"posts": {
"data": [
{
"comments": {
"data": [
{
"created_time": "2020-01-25T16:48:03+0000",
"message": "I love all kind of art and paintings. However 19 thousand dollars for a painting is entirely too much!!. ",
"id": "1579832716452874_1373756966159579"
},
{
"created_time": "2020-01-25T15:21:29+0000",
"message": "The wind blows a piece of paper and lands next to your house. You unravel it, \"Hey hope you are having a nice day!\"...",
"id": "1579832716452874_1373704542831488"
}
]
}
}
]
}
}`
and so on. I would like for my data frame to be split in the following columns:
`created_time|message|id`
along with their respective data. I have tried the following command but with no success as i'm getting the same exact output:
` df <- data.frame(matrix(unlist(data), ncol=length(data), byrow = FALSE))`
Also because the data are saved as text, the json packages (rjson,jsonlite) won't work. Any suggestions will be greatly appreciated.