Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- </head>
- <body>
- <script>
- var data = [{
- "name": "Bebe",
- "lastname": "Rexha",
- "description": "Young and beautiful",
- "producer": "ABC Music",
- "users_name": "BebeLove",
- },
- {
- "name": "Katy",
- "lastname": "Perry",
- "description": "Cute and sweet",
- "producer": "Kitty Music",
- "users_name": "KittyCat",
- },
- ]
- var htmlText = '';
- for ( var key in data ) {
- htmlText += '<div class="div-conatiner">';
- htmlText += '<p class="p-name"> Name: ' + data[key].name + '</p>';
- htmlText += '<p class="p-loc"> LastName: ' + data[key].lastname + '</p>';
- htmlText += '<p class="p-desc"> Description: ' + data[key].description + '</p>';
- htmlText += '<p class="p-created"> Produced by: ' + data[key].producer + '</p>';
- htmlText += '<p class="p-uname"> Username: ' + data[key].users_name + '</p>';
- htmlText += '</div>';
- }
- $('body').append(htmlText);
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment