There is for example json:
{ "SALUTATION": { "Hellow":"world" }, "SOMETHING": "bla bla bla Mr. Freeman" } From it you need to remove all the keys: SALUTATION , Hellow , SOMETHING using bash.
If you use jq 'keys':
JSON='{ "SALUTATION": { "Hellow": "world" }, "SOMETHING": "bla bla bla Mr. Freeman" }' echo $JSON | jq 'keys' At the output I get ["SALUTATION", "SOMETHING"] , i.e. only keys of the first level. I want to understand how to display all the keys, regardless of what level they are on.
bashtag, do you need to solve the problem using console utilities? Write what and how they tried to do, etc., on SO they do not solve other people's problems. - approximatenumber