ahausladen / JsonDataObjects

JSON parser for Delphi 2009 and newer
MIT License
413 stars 160 forks source link

Support for "delete by path" #65

Open bflorac opened 2 years ago

bflorac commented 2 years ago

It is great to be able to read and write a record by its JsonPath. This means that any function that need to modify the value only needs to be passed its path as a string. Still there are times when passed a path, it is determined that the key/value needs to be deleted. It would be nice if the path tools provided a "delete by path" function. I have done this by trimming off the path, getting the object of parent, locating the object to be deleted as a child of the parent and having he parent delete it. While this works, it seems there might be a better way.