Advertisement
metalx1000

Get Crew Information from Callback Staffing

Jul 28th, 2015
767
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Load jQuery
  2. var jq = document.createElement('script');
  3. jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
  4. document.getElementsByTagName('head')[0].appendChild(jq);
  5. // ... give time for script to load, then type.
  6. jQuery.noConflict();
  7.  
  8. var d
  9. $.get("https://www.callbackstaffing.com/Application/Ajax/CrewScheduler/", {start:1438041600,end:1438128000,dataChanged:0},function(data){d=JSON.parse(data.data)})
  10.  
  11. //Find Engine 24 Crew
  12. d.forEach(function(loc){
  13.   if(loc.title == "Engine 24" && loc.start == "2015-07-27 08:00:00"){
  14.     loc.users.forEach(function(user){
  15.       console.log(user.lastname)
  16.     })
  17.   }
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement