title: How to Access the inner(nested) key-value in an YAML file using snakeYaml Library
body: <p>I am trying to read config.yaml file using the snakeYaml library in java.</p>
  
  <p>I am able to get the Module name (i.e <code>[{ABC=true}, {PQR=false}]</code>) in my config file.
  Is there a way where I can directly read the value of ABC (ie true) using the code.</p>
  
  <p>I have tried to search online but they are not exactly what I am looking for.
  Few links that I went through mentioned below:</p>
  
  <p><a href="https://stackoverflow.com/questions/21141120/load-yml-file-into-hashmaps-using-snakeyaml-import-junit-library">Load .yml file into hashmaps using snakeyaml (import junit library)</a></p>
  
  <p><a href="https://www.java-success.com/yaml-java-using-snakeyaml-library-tutorial/" rel="nofollow noreferrer">https://www.java-success.com/yaml-java-using-snakeyaml-library-tutorial/</a></p>
  
  <p><strong><em>config.yaml</em> data:</strong></p>
  
  <pre><code>Browser: FIREFOX
  Module Name:
  - ABC: Yes
  - PQR: No
  </code></pre>
  
  <p><strong>Below is the code that I am using</strong> </p>
  
  <pre><code>import java.io.FileNotFoundException;
  import java.io.FileReader;
  import java.io.Reader;
  import java.util.Map;
  import org.yaml.snakeyaml.Yaml;
  
  public class YAMLDemo {
  
      public static void main(String[] args) throws FileNotFoundException {
  
          Yaml yaml = new Yaml();
          Reader yamlFile = new FileReader("./config.yaml");
  
          Map&lt;String , Object&gt; yamlMaps = yaml.load(yamlFile);
  
          System.out.println(yamlMaps.get("Browser"));
          System.out.println(yamlMaps.get("Module Name"));
      }
  }
  </code></pre>
  
  <p><strong>Console Output:</strong></p>
  
  <pre><code>FIREFOX
  [{ABC=true}, {PQR=false}]
  </code></pre>
  
  <p>Any help is really appreciated. Thanks in advance.</p>