Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2019-05-13T13:12:28.140Z
Answers: 2019-05-13T14:48:33.143Z
Answers: 2019-05-13T14:48:33.143Z
Answers: 030
Body: <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>
  
Tags: <yaml>
Title: What options are available to get a value that is associated to a key in yaml?
UserDisplayName: 030
ThreadText: # 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](https://github.com/030/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
  >
  > ```
  
  
  ---
  
  