Remove a JSON property anywhere in the tree


To remove a property (required in the example below) from anywhere in a JSON object tree, using jq:

jq 'walk(if type == "object" then del(.required) else . end)' my.schema.json

Date: 2019-07-21

Tags:  json  jq

Share: