Closed wgroenewald closed 4 years ago
When trying to run yq on a yaml path that has a hyphen in it I get an error: cat file.yml | yq .redis-ha.auth
cat file.yml | yq .redis-ha.auth
error:
jq: error: ha/0 is not defined at <top-level>, line 1: .redis-ha.auth jq: 1 compile error yq: Error running jq: IOError: [Errno 32] Broken pipe.
When trying to extract different values without hyphens I get the expected result
yq uses jq which uses the Javascript grammar which does not permit hyphens in identifiers. You have to use bracket accessors instead of dot: yq '.["redis-ha"].auth'
yq '.["redis-ha"].auth'
When trying to run yq on a yaml path that has a hyphen in it I get an error:
cat file.yml | yq .redis-ha.auth
error:
When trying to extract different values without hyphens I get the expected result