I have an array of JSON objects as a string that I would like to load into R as a data.frame
. IN particular, assume I have the following JSON,
[
{ "a": 1, "b": "c" },
{ "a": 1, "b": "d" }
]
What I want is a data.frame
whose columns are all unique keys of all objects in the above, and 1 row per entry in the array, like so,
a b
1 1 "c"
2 1 "d"
This behavior is identical to pandas.DataFrame.from_records
in Python. Does such a method exist?