skip to Main Content

sed/awk hide/mask field in a json file

I am trying to mask/hide a value of a field in a json file. I have json that looks something like this: "PLUSDATA": { "global": { "auth_type": "login", "passkey": "SENSETIVE_CONTENT_TO_BE_HIDDEN", "src_intf": "Loopback0", "timeout": "5" } }, I'd like to parse…

VIEW QUESTION

Sorting a JSON file by outer object name

I have a json file input.json thus: { "foo":{ "prefix":"abc", "body":[1,2,3] }, "bar":{ "prefix":"def", "body":[4,5,6] } } I would like to sort it by the outer object names, with "bar" coming before "foo" in alphabetical order like so: { "bar":{…

VIEW QUESTION
Back To Top
Search