Let's say I have a JSON as such:
[
{
name: "user1",
age: 12,
category: "young",
},
{
name: "user2",
category: "old",
},
{
name: "user3",
age: 23,
}
]
As we can see user1 has the most complete properties which are name, age, category while user2 only has name, category and user3 only has name, age. How can I convert this to a dataframe where the expected result is as such:
| id | name | age | category |
|---|---|---|---|
| 1 | user1 | 12 | young |
| 2 | user2 | null | old |
| 3 | user3 | 23 | null |
Hence leaving the empty property as null.
Note that every user can have their JSON property in different position. For example user4 might have properties in the order of name, age, category while user5 might have properties in the order of age, name, category