【发布时间】:2019-01-11 00:46:26
【问题描述】:
假设我有以下 JSON 输出:
{
"Stacks": [
{
"StackName": "hello-world",
"Tags": [
{
"Key": "environment",
"Value": "sandbox"
},
{
"Key": "Joe Shmo",
"Value": "Dev"
}
]
},
{
"StackName": "hello-man",
"Tags": [
{
"Key": "environment",
"Value": "live"
},
{
"Key": "Tandy",
"Value": "Dev"
}
]
}
]
}
我将如何编写一个jq 查询来获取所有不具有Tags 值"Key": "Joe Shmo" 的堆栈的StackNames?所以结果会简单地返回hello-man。
【问题讨论】: