我正在使用jq,但在我的json标签中使用" - "使jq无法编译.我无法逃避它使其成功.这里是命令
curl -X GET -H "X-AppKey:foo" "foo/v2/_status" | jq '.component-status[]'
Run Code Online (Sandbox Code Playgroud)
我在jq的github上阅读了这篇文章https://github.com/stedolan/jq/issues/202,但我无法使其有效.
这是卷曲的输出
{
"status": "ok",
"hostname": "0b0b495a46db",
"component-status": [
{
"status-code": 200,
"component": "Service1",
"status": "OK"
},
{
"status-code": 200,
"component": "Service2",
"status": "OK"
}
]
}
Run Code Online (Sandbox Code Playgroud)
任何的想法?