This gist shows how to convert a nested JSON file to an R data.frame. To do this, it uses jsonlite and data.tree.
The gist contains two examples: one is a bit simpler, the second one a bit more advanced.
In the first example, we download all the repos from Hadley Wickham's Github account from https://api.github.com/users/hadley/repos . This JSON contains a nested owner object. The code shows how to convert that in a flat data.frame in three statements:
- line 5: download
- line 8: convert to data.tree