You'll have to explain a bit further what you're trying to do. Does your file conatain an array of objects, and you want to delete one. Or does your file contain just one object and you want to erase it. (Although it seem you could do that by just deleting the file).
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter