在bash中操纵JSON
我有一个JSON文件,我需要更新一个特定的值。 { "Comment": "comment", "test": { "enabled": true }, "enabled": true, "otherStuff": blah, "otherStuff2": blah, "otherStuff3": blah, } 我想将第二个“启用”的值更改为false。 使用JQ Parser,我可以使用jq'.enabled '轻松地检索它,但我不确定操纵JSON的最佳方式是什么。 JSON是我从API获取的响应,将来可能会发生变化,我不能依赖前面的行或值。