Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": 1,
- "hadRead": false
- },
- {
- "id": 2,
- "hadRead": true
- },
- {
- "id": 3,
- "hadRead": false
- }
- ]
- <script>
- $(function() {
- $.ajax({
- type: 'GET',
- url: '/ajax/db/data.json',
- contentType: "application/json; charset=utf-8",
- dataType: "json",
- success: function(messages){
- console.log('succsess', messages);
- $.each(messages, function(i, message) {
- //if(message.hasRead === false){
- $('#messages').append('<li>' + message.hasRead + '</li>');
- //}
- });
- }
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement