title: Not able to get a value from yml file in groovy
body: <p>I have stored an entire yaml file into a <code>Map yamlConfig</code> which i am able to print and check. </p>
  
  <p>The Output when I run the code: <code>yamlConfig.each{ k, v -&gt; println "${k}:${v}" }</code> is:</p>
  
  <pre><code>Host:localhost
  Port:10000
  application:[name:ABC, preferences:[UUID:d3f3278e, server:localhost:2222]]
  services:[[name:XYZ, instances:1, start:true]]
  dataSets:[[name:ABC], [name:XYZ]]
  </code></pre>
  
  <p>Now, I am trying to fetch a value from Map using following code:</p>
  
  <pre><code>println yamlConfig.get("services").getAt("name")
  </code></pre>
  
  <p>However, I am getting the value: <code>[XYZ]</code>. Instead I need the result as <code>XYZ</code>, without square brackets.</p>
  
  <p>Yml file I am using:</p>
  
  <pre><code>Host: localhost
  Port: 10000
  application:
    name: ABC
    preferences:
      UUID: d3f3278e
      server: localhost:2222
  services:
    - name: XYZ
      instances: 1
      start: true
  data:
    - name: ABC
    - name: XYZ
  </code></pre>