title: call multiple ajax call with Jquery deferred When and then(3 parallel calls and then on complete one more ajax call)
body: <p>My requirement is to <strong>call 3 ajax call in parallel then only on complete of the 3 calls , I am requesting one more Ajax call</strong>. So for i am able to achieve this by the following this <a href="https://css-tricks.com/multiple-simultaneous-ajax-requests-one-callback-jquery/" rel="nofollow">article</a> by Chris from CSS-trick</p>
  
  <pre><code>`$.when(
    $.get("url1"), //goes in parallel
    $.get("url2"), //goes in parallel
    $.get("url3") //goes in parallel
  ).then(
    $.get("url4") // fires only on completion of 3 calls above.
  );`
  </code></pre>
  
  <p>But my code stuructre is like</p>
  
  <pre><code>`$.when(
     threeCalls(){
     //this gives 3 ajax calls from here
  })
  .then(
     singlecall(){
     //this shoould be only called after 3 calls been successfull
  })`
  </code></pre>
  
  <p>This way it does not wait for the <code>singlecall()</code> to wait for the <code>threecalls()</code> method to finish and all calls(4 of them) goes in <strong>parallel/async</strong>.</p>
  
  <p>How i should achieve this?</p>