Link to test case: https://jsfiddle.net/BeerusDev/drufevb8/2/ here is the logic I used to transform the data structure.
Here is how the data is shown when I console log it:
{
"Department": "IT",
"Employee": "Shap Dev",
"Days": [
{
"Day": "Monday",
"Date": "6/28/2021",
"Status": "P",
"Location": "Office"
},
{
"Day": "Tuesday",
"Date": "6/29/2021",
"Status": "P",
"Location": "Office"
},
{
"Day": "Wednesday",
"Date": "6/30/2021",
"Status": "P",
"Location": "Office"
},
{
"Day": "Thursday",
"Date": "7/1/2021",
"Status": "P",
"Location": "Office"
},
{
"Day": "Friday",
"Date": "7/2/2021",
"Status": "P",
"Location": "Office"
}
]
};
I am trying to populate the Monday and Monday Status (followed by every other corresponding day and status), but I keep getting an alert that I am trying to access an unknown parameter?