Hi,
I have the following a big Array that looks like this.
{
"body": [
{
"Date": "24/Apr/2023",
"Subject": "Maths",
"Start Time": "08:30 AM",
"End Time": "09:30 AM",
"Lunch Duration": 0
},
{
"Date": "24/Apr/2023",
"Subject": "Lunch",
"Start Time": "12:00 PM",
"End Time": "12:30 PM",
"Lunch Duration": 30
},
{
"Date": "24/Apr/2023",
"Subject": "English",
"Start Time": "02:30 PM",
"End Time": "03:30 PM",
"Lunch Duration": 0
}
{
"Date": "25/Apr/2023",
"Subject": "Maths",
"Start Time": "07:30 AM",
"End Time": "09:30 AM",
"Lunch Duration": 0
},
{
"Date": "25/Apr/2023",
"Subject": "Lunch",
"Start Time": "12:00 PM",
"End Time": "12:50 PM",
"Lunch Duration": 50
},
{
"Date": "25/Apr/2023",
"Subject": "English",
"Start Time": "01:30 PM",
"End Time": "03:30 PM",
"Lunch Duration": 0
}
]
}
I want to create a new Array that combines the first 3 attributes such that my new Array looks like this.
{
"body": [
{ "Date": "24/Apr/2023",
"Start Time": "08:30 AM",
"Lunch Duration": 30,
"End Time": "03:30 PM"
}
{ "Date": "25/Apr/2023",
"Start Time": "07:30 AM",
"Lunch Duration": 50,
"End Time": "03:30 PM"
}
]
}
I'm only interested in the "Date", "Start Time", "Lunch Duration" and "End Time" in that order. My original Array has that in this order.
Thank you