This is an example of the JSON file I'm working with, it has around 600 rows of the same nested JSON structure.
{
"at": {
"Availability": "Yes",
"Message": "NV",
"Delivery option": "fast",
},
"childNodeIds": [],
"crawlMessageFlags": null,
"pd": {
"product_id": "product_id value",
"product_name": "product_name value",
"retailerName": "retailerName value",
"stock_status": "InStock",
"subClassName": "n/a"
},
"sellers": [],
"zipDetails": {}
}
I want to generate a report that has the keys inside PD as the column names. Example
--------------------------------------------------------
product_id | product_name | retailerName
-----------------------------------------------------------
productid value1| product_name value1| retailerName value1
productid value2| product_name value2| retailerName value2
productid value3| product_name value3| retailerName value3
productid value4| product_name value4| retailerName value4
I can generate this table with hardcoded values but I want to do it dynamically as we have several different use cases.
I have tried several solutions from the web but none solves this without hardcoding.
Any solutions?