title: Assigning read yaml file to variable in browser to be used in jquery
body: <p>I am trying to parse a yaml file that exists as a local file in the filesystem and assign it to a variable that can be used in jquery.
  I can see from the console.log that _yaml variable contains the read yaml in a readable format but the returning of it and assigning it to ymlconfig does not seem to work (//NOT WORKING part below shows up as undefined in console).</p>
  
  <pre><code>$( document ).ready(function() {
      var ymlconfig = read_config('config.yaml');
      console.log(ymlconfig["compute"][0]); //NOT WORKING
  
      function read_config(cfgfile) {
          $.get({url: cfgfile, dataType: "text"}).done(function (data) {
              var _yaml = jsyaml.load(data);
              console.log(_yaml["compute"][0])  //WORKING OK
              return _yaml;
          });
      };
  </code></pre>