I have a json file as follows:
{
"1234":{"Messages":{"1":{"Content":["How are you","today"]},"2":{"Content":["I am great"]}}},
"2344":{"Messages":{"1":{"Content":["It's a plan"]}}}}
I am trying to convert this content to this data frame:
df <- data.frame(id=c(1234,2344), Content1=c("How are you today","It's a plan"), Content2=c("I am great", ""))
I have tried a few things with jsonlite and pluck but challenged over the iterative part of the code.
Any advice appreciated. Thank you.