With PHP, I'm opening a file and it looks like this:
var people = {
vikram: { time1: [ '8:00am', '8:20am', '8:40am', '9:00am', ], time2: [ '10:20am', '10:40am', '11:00am', '11:20am', ], time3: [ '8:00am', '8:20am', '8:40am', ], }};
The variable I'm trying to remove will contain a time (ex. 8:00am) and I will know the timeIndex(ex. time1). I also want to keep all the other times intact.
For example, if I set the variable to 8:40am, I want the new file that is being created to look like this:
var people = {
vikram: { time1: [ '8:00am', '8:20am', '9:00am', ], time2: [ '10:20am', '10:40am', '11:00am', '11:20am', ], time3: [ '8:00am', '8:20am', '8:40am', ], }};
Any help would be appreciated!