Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. [
  2. {
  3. "id": 1,
  4. "hadRead": false
  5. },
  6. {
  7. "id": 2,
  8. "hadRead": true
  9. },
  10. {
  11. "id": 3,
  12. "hadRead": false
  13. }
  14. ]
  15.  
  16. <script>
  17.  
  18. $(function() {
  19. $.ajax({
  20. type: 'GET',
  21. url: '/ajax/db/data.json',
  22. contentType: "application/json; charset=utf-8",
  23. dataType: "json",
  24. success: function(messages){
  25. console.log('succsess', messages);
  26. $.each(messages, function(i, message) {
  27. //if(message.hasRead === false){
  28. $('#messages').append('<li>' + message.hasRead + '</li>');
  29. //}
  30. });
  31. }
  32. });
  33. });
  34.  
  35. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement