title: how to read a json config file and setting that parameter to ajax
body: <p>I have a Json(config/server.json) config file which has server configuration.
  eg:</p>
  
  <pre><code>{
      "server": "127.0.0.1"
  }
  </code></pre>
  
  <p>I want to read that 'server' parameter and assign that value to my other jquery functions.</p>
  
  <p>eg:</p>
  
  <blockquote>
  <pre><code>  var server = "";
  
  $(document).ready(function() {
            loadConfigFile();
         loadCustomers();
  });
  
    function loadConfigFile() {
            $.getJSON('config/server.json', function(jd) {
                $.each(data.server, function(i,s){
                    alert(s);
                });
            });
        };
  
    function loadCustomers() {
            $
                    .ajax({
                        type : 'GET',
                        url : server+':8080/cache/getCustomers',
        ...
  }
  </code></pre>
  </blockquote>
  
  <p>My loadConfig file is not reading the JSOn file..What im doing wrong here?</p>