I have a file where each line in a file is a valid JSON document.
I’m developing a command-line tool that operates over a file that contains valid JSON documents.
I’m developing a command that looks like delete {name: "foo"}
It means Now I have to match the documents in a file with {name: "foo"}
and delete all those lines.
I’m able to filter those lines by streaming file and decoding the line and matching with passed string but unable to delete that matched line from a file.