How to delete a specific item from JSON using javascript
A mainly I want to delete Mon -> from time to be empty after clicking a button
const arr = {
"Mon": [
{
"from": "08:00 AM",
"to": "09:00 AM"
},
{
"from": "06:00 PM",
"to": "07:00 PM"
}
],
"Sun": [
{
"from": "",
"to": ""
},
{
"from": "",
"to": ""
}
]
};
const arr = {
"Mon": [
{
"from": "08:00 AM",
"to": "09:00 AM"
},
{
"from": "06:00 PM",
"to": "07:00 PM"
}
],
"Sun": [
{
"from": "",
"to": ""
},
{
"from": "",
"to": ""
}
]
};
it is not working please help me