I need to find a way to allow a user to delete an entry from the text file via a user interface.
Can anyone point me in the right direction. The issue I'm having is how to locate the specific entry and remove it.
Here is what the file looks like:
- Code: Select all Expand view
{
"items": [
{
"name": "color 1",
"image": "",
"day": "1",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "1",
"location": "",
"description": ""
},
{
"name": "color 2",
"image": "",
"day": "2",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "2",
"location": "",
"description": ""
},
{
"name": "color 3",
"image": "",
"day": "3",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "3",
"location": "",
"description": ""
},
{
"name": "color 4",
"image": "",
"day": "4",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "4",
"location": "",
"description": ""
},
{
"name": "color 5",
"image": "",
"day": "5",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "5",
"location": "",
"description": ""
},
{
"name": "color 6",
"image": "",
"day": "6",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "6",
"location": "",
"description": ""
},
{
"name": "color 7",
"image": "",
"day": "7",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "7",
"location": "",
"description": ""
},
{
"name": "color 8",
"image": "",
"day": "8",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "8",
"location": "",
"description": ""
},
{
"name": "color 9",
"image": "",
"day": "9",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "9",
"location": "",
"description": ""
},
{
"name": "color 10",
"image": "",
"day": "10",
"month": "4",
"year": "2020",
"time": "",
"duration": "1",
"color": "10",
"location": "",
"description": ""
},
{
"name": "xxxRobertoRoberto Tapia",
"image": "events/images/roberto_tapia.jpg",
"day": "8",
"month": "3",
"year": "2020",
"time": "8:00 pm",
"duration": "4",
"color": "4",
"location": "",
"description": ""
}
]