title: Groovy YAML parsing
body: <p>I am trying to parse some yaml from a file with Groovy here is what I currently have:</p>
  <pre><code>import groovy.yaml.YamlSlurper
  def yamlFile = new File('./test.yaml')
  def inputYaml = new YamlSlurper().parse(yamlFile)
  inputYaml.each{ println it }
  </code></pre>
  <p>The above prints the yaml file, also below is my yaml file</p>
  <pre><code>HOST-0:
    tags:
      name: 'HOST0'
      size: 'small'
      region: 'west'
  HOST-1:
    tags:
      name: 'HOST0'
      size: 'small'
      region: 'west'
  </code></pre>
  <p>What I'm wonder is if it is possible to create a separate yaml object that would lookup certain values, so lets say I wanted to create a new yaml file that would look like:</p>
  <pre><code>HOST-0:
    hostname: 'HOST0'
  </code></pre>
  <p>Normally I would be able to do a lookup which would lookup which would look something like  HOST-0:tags:host just wondering if it's possible to do this sort of lookup on each yaml object i.e HOST-0 and HOST-1 without specifying them or if anyone has any ideas</p>