Let's assume I have data which is structured like such:
{
"_id" : 245,
"connId" : "3r34b32",
"roomList" : [
{
"reportId" : 29,
"siteId" : 1
}]
}
How do I go about getting the keys from the dictionary within the list, along with the value in order for it to have this expected output below.
Expected Output:
ID,connID,reportId,siteId
245,3r34b32,29,1
I'm using json_normalize but this does not work with lists, so I need to add an extra bit of code which can unpack the list that contains a dictionary.
Any help will be appreciated.