I am working with an array of objects that contain nested arrays.
const arr = [
{
JUNE: [
{
"iD": "67854",
"event": " closed",
"title": "test",
"startDate": "2024-06-20",
"endDate": "2024-07-25"
}
]
},
{
MAY: [
{
"ID": "908765",
"event": "closed",
"title": "test",
"startDate": "2024-05-21",
"endDate": "2024-06-27"
},
{
ID: "12345",
event: "open",
title: "test123",
startDate: "2024-05-21",
endDate: "2024-06-27"
}
]
}
]
I require the following output:
[
{
ID: "67854",
event: "closed",
title: "test",
startDate: "2024-06-20",
endDate: "2024-07-25"
},
{
ID: "908765",
event: "closed",
title: "test",
startDate: "2024-05-21",
endDate: "2024-06-27"
},
{
ID: "12345",
event: "open",
title: "test123",
startDate: "2024-05-21",
endDate: "2024-06-27"
}
]