Removing a key from parent object with jq
I believe your original attempt should have worked as expected. Here is what I get when I try it:
$ jq 'del(.pages)' myfile.json
{
"actions": {
"pages": {
"stuff": "..."
}
}
}
Try it online at jqplay.org
To remove all pages everywhere you would need something like
$ jq 'del(.. | .pages?)' myfile.json
{
"actions": {}
}
Try it online at jqplay.org