Advertisement
julong

read json

Sep 28th, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. /*
  2. * Project name :
  3. * Project Owner :
  4. * version release : 1 on 7/7/2014
  5. * Version control : Github
  6. * Author : EAKKASIT TUNSAKOOL
  7. * Status : IOS DEVELOPER , Interactive , UI/UX , Front-end/Back-end Developer ,
  8. * Web-designer , Web Service , 3D Web Gallery , 3D Model , Sculpt
  9. * Team-backend ************************************************************************************
  10. *
  11. *
  12. *
  13. */
  14. var array = [];
  15. //start ajax
  16. $.ajax({
  17. url: 'persons.json',
  18. type: 'GET',
  19. dataType: 'json',
  20. data:"",
  21. })
  22. .done(function(data) {
  23.  
  24. $.each(data, function(key, val) {
  25. //val['something']
  26. //array.push(val['something'])
  27. });
  28. })
  29. .fail(function() {
  30. console.log("error");
  31. })
  32. .always(function() {
  33. console.log("complete");
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement