<p>One could use <a href="https://github.com/030/go-yq" rel="nofollow noreferrer">go-yq</a> if one wants to lookup a value by applying jq style, i.e. if firefox_version then one could look it up by adding a dot:</p>

<blockquote>
<pre><code>docker run -v ${PWD}:/ansible-firefox utrecht/go-yq:2.1.0 \
       .firefox_version /ansible-firefox/defaults/main.yml
</code></pre>
</blockquote>

CC BY-SA 4.0
2019-05-13T13:12:28.140Z
2019-05-13T14:48:33.143Z
2019-05-13T14:48:33.143Z
030
<p>I often used jq to lookup a value in json. How to do this in yaml? I do not want to use something like sed as too much characters have to be removed then.</p>

<yaml>
What options are available to get a value that is associated to a key in yaml?
030
# What options are available to get a value that is associated to a key in yaml?

(Asked by: username_0 on 2019-05-13)

I often used jq to lookup a value in json. How to do this in yaml? I do not want to use something like sed as too much characters have to be removed then.

**Tags:** yaml


---

## 1 answers

### Answer by username_0 on 2019-05-13. Score: 0 | Accepted answer

One could use go-yq if one wants to lookup a value by applying jq style, i.e. if firefox_version then one could look it up by adding a dot:

docker run -v ${PWD}:/ansible-firefox utrecht/go-yq:2.1.0 \
       .firefox_version /ansible-firefox/defaults/main.yml


---

