【发布时间】:2021-10-20 01:36:03
【问题描述】:
我该如何操作这块 json:
{
"id": "whatever",
"attributes": [
{
"key": "this",
"value": "A"
},
{
"key": "that",
"value": "B"
},
{
"key": "other",
"value": "C"
}
]
}
这样它就可以匹配“那个”并删除该分组中的键和值,让 json 像这样:
{
"id": "whatever",
"attributes": [
{
"key": "this",
"value": "A"
},
{
"key": "other",
"value": "C"
}
]
}
我正在尝试在 linux 上使用 jq。
【问题讨论】: