I am attempting to replicate a spreadsheet whereby the data looks like this:
+--------------------+---------+---------+---------+-----+
| Date | 01-2022 | 02-2022 | 03-2022 | ... |
+--------------------+---------+---------+---------+-----+
| http://google.com | 100% | 73% | 100% | ... |
| http://twitter.com | 50% | 70% | 100% | ... |
| ... | ... | ... | ... | ... |
+--------------------+---------+---------+---------+-----+
The issue is that I have to build these monthly time buckets dynamically on my back end, and the percentages match for each site.
An example of the response I receive from my API is:
[
{
"url": "http://google.com",
"percentagesByMonth": [
{
"month": "01-2022",
"percent": 100
},
{
"month": "02-2022",
"percent": 73
},
...
]
},
{
"url": "http://twitter.com",
"percentagesByMonth": [
{
"month": "01-2022",
"percent": 50
},
{
"month": "02-2022",
"percent": 70
},
...
]
},
...
"allMonths": ['01-2022', '02-2022', '03-2022', ... ]
]
How can I create a table which has the above desired output?
I can't seem to figure out how to use the dynamic column settings to have a column for each month.