title: Jenkins get last but one build status
body: <p>I can get the last build (successful/failed) from the json api of jenkins like mentioned in the below stack overflow link,</p>
  
  <p><a href="https://stackoverflow.com/questions/18238616/jenkins-get-last-completed-build-status">Jenkins - Get last completed build status</a></p>
  
  <p>My question is, how can I get the last but one build status?? Please let me know if there is a way to achieve this.</p>
  
  <p>My ultimate aim is to get the build status of the previous build status in a loop until a particular date is reached. </p>