I have an input JSON shown below:
data: {
“2020-09-19”: [
{
end: “2020-09-19T10:30:00Z”,
start: “2020-09-19T06:52:10Z”,
user: “rakul”
},
{
end: “2020-09-19T18:30:00Z”,
start: “2020-09-19T10:30:00Z”,
user: “jeet”
},
{
end: “2020-09-20T02:30:00Z”,
start: “2020-09-19T18:30:00Z”,
user: “rahul”
}
],
“2020-09-22": [
{
end: “2020-09-20T10:30:00Z”,
start: “2020-09-20T02:30:00Z”,
user: “rakul”
},
{
end: “2020-09-20T18:30:00Z”,
start: “2020-09-20T10:30:00Z”,
user: “jeet”
},
{
end: “2020-09-21T02:30:00Z”,
start: “2020-09-20T18:30:00Z”,
user: “rahul”
}
]
}
I want to display the JSON in the below format in React:
The challenge I am facing here is since the JSON contains multiple keys with different dates, I am not able to perform a map on the object. Can someone suggest how to do display the above JSON in the table/list format as shown in the image?
