title: Return Value from inside of $.ajax() function
body: <p>How do I return a value from inside of an <code>$.ajax</code> function?</p>
  
  <p>This is my basic setup:</p>
  
  <pre><code>function something(){
   var id = 0;
   $.ajax({
          'url':'/some/url',
          'type':'GET',
          'data':{'some':'data'},
          'success':function(data){
                       id = data['id'];
           }
     });
  
    return id;
  }
  </code></pre>