title: yaml-cpp parsing nested maps and sequences error
body: <p>I am trying to parse a file with nested maps and sequences which somewhat looks like this</p>
  
  <pre><code>annotations:
   - dodge:
     type: range based
     attributes:
      start_frame:
       frame_number: 25
       time_stamp: 2017-10-14 21:59:43
      endframe:
       frame_number: 39     
       time_stamp: 2017-10-14 21:59:45
      distances:
       - 2
       - 5
       - 6
  </code></pre>
  
  <p>I am getting an error saying Ensure the node exists. Below is my sample code.</p>
  
  <pre><code>YAML::Node basenode = YAML::LoadFile(filePath);
  
  const YAML::Node&amp; annotations = basenode["annotations"];
  
  RangeBasedType rm;
  
  for (YAML::const_iterator it = annotations.begin(); it != annotations.end(); ++it)
  {
      const YAML::Node&amp; gestures = *it;
  
      std::string type = gestures["type"].as&lt;std::string&gt;(); // this works
  
      rm.setGestureName(type);
  
      if (type == "range based")
      {
          const YAML::Node&amp; attributes = gestures["attributes"];
  
          for (YAML::const_iterator ti = attributes.begin(); ti != attributes.end(); ++ti)
          {
              const YAML::Node&amp; frame = *ti; 
  
              if (frame["start_frame"]) // this fails saying it is not a valid node
              {
                  std::cout &lt;&lt; frame["frame_number"].as&lt;int&gt;();
  
                  rm.setStartFrame(frame["frame_number"].as&lt;int&gt;());
              }
          }
      }
  }
  </code></pre>
  
  <p>I wish to get the frame_number from nodes start_frame and end_frame. I have checked the YAML format for validity. Any reasons on why this is not working? </p>