I have used a code I found on here Building table dynamically with PDFMake it works perfectly fine with dynamic data coming from an API. But my problem is Nested JSON.
This is how the JSON looks like:
dataseries":[
{
"timepoint":3,
"cloudcover":2,
"seeing":6,
"transparency":2,
"lifted_index":10,
"rh2m":2,
"wind10m":{
"direction":"N",
"speed":2
},
"temp2m":23,
"prec_type":"none"
},
{
"timepoint":6,
"cloudcover":2,
"seeing":6,
"transparency":2,
"lifted_index":15,
"rh2m":3,
"wind10m":{
"direction":"N",
"speed":2
},
"temp2m":21,
"prec_type":"none"
},
I am trying to generate the content of wind10m specifically the direction and speed on the PDF file. How do I access and generate two different columns of direction and speed?
This is my stackblitz demo:https://stackblitz.com/edit/angular-ojgxtj?file=src%2Fapp%2Fapp.component.ts