jq not working on tag name with dashes and numbers
You need to enclose in brackets and double quotes: jq ‘.”component-status”‘ With your given input it returns: [ { “status”: “OK”, “component”: “Service1”, “status-code”: 200 }, { “status”: “OK”, “component”: “Service2”, “status-code”: 200 } ] The jq Manual (development) –> Basic filters: .foo, .foo.bar The simplest useful filter is .foo. When given a JSON object … Read more