我对命令 jq 真的很陌生,我正在尝试进行一些过滤以删除我不想要/不需要的数据块。
这是我的 JSON 结构示例:
{
"BackupCfg": [
{
"type": "filesystem",
"repository": "trunk",
"url": "test.example.com",
"port": "394",
"cfg": [
{
"Default": "true",
"ID": "trunk00",
"Paths": [
"/etc",
"/home",
"/var",
"/usr/local",
"/opt",
"/root"
],
"Cron": "33 0 * * *"
}
]
},
{
"type": "filesystem",
"repository": "trunk02",
"url": "test.example.com",
"port": "394",
"cfg": [
{
"ID": "trunk01",
"Paths": [
"/opt/example",
"/opt/var_example"
],
"Cron": "*/30 0-23 * * *"
}
]
},
{
"type": "database",
"repository": "trunk-db",
"url": "test.example.com",
"port": "399", …Run Code Online (Sandbox Code Playgroud)