My idea is to read the file and convert it to an array or object, delete the elements you don’t want, convert them back to json, and rewrite the file. Or you can directly replace the data with nothing through string replacement when you clearly know the data you want to delete.
My idea is to read the file and convert it to an array or object, delete the elements you don’t want, convert them back to json, and rewrite the file. Or you can directly replace the data with nothing through string replacement when you clearly know the data you want to delete.
Read, deserialize, operate, serialize, write back.
I don’t understand what I mean. Can you explain it in detail