Parsing JSON and YAML Files with jq and yq in Shell Scripts
jq only reads JSON. Run it on a YAML file and it fails: jq ‘.name’ data.yaml prints jq: parse error: Invalid numeric literal at line 1, column 5 (tested with jq 1.8.2). To query YAML in a shell script, use… Read moreParsing JSON and YAML Files with jq and yq in Shell Scripts