title: Send AJAX request on each loop iteration after each AJAX success respond
body: <p>I have an array of ids, and I need to send each id with separate AJAX request. But each next id in the array needs to be sent only after AJAX received a success response from the server for the previuse request.</p>
  
  <pre><code>var idsArrays = [2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ];
  
      $.each(idsArrays, function( index, value ) {
          var data = "id="+value;
          $.ajax({
              type: 'POST',
              url: formRequiredAction,
              data: data,
              dataType: 'json',
              success: function(resp){
                  console.log('success ' + resp);
              },
              error: function(resp){
                  console.log('error ' + resp);
              },
          });
      });
  </code></pre>
  
  <p>How can I set pause or wait time for next iteration until ajax will receive success response from the server?</p>