I have json file which is placed into Linux server. I want to delete particular object from second position onward.
1. Root element keep it and same object which is repeated in json file has to be removed.
2. how to append box brackets in json data

Note: We don't have access to install JP in Linux sever we have to achieve this via sed or awk or any Linux shell commands.

i tired sed and awk command but no luck

sed '/"audit"/,/}/ d; /^$/d' sample_request.json >> test.json -- This...

How to remove object in json file via linux command

------------------------------------------------------------------------------------ - Source: Read on Source Website...

Source Site: Linux.org

Link: https://www.linux.org/

Original-URL: https://www.linux.org/threads/how-to-remove-object-in-json-file-via-linux-command.22682/