Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // how you get 'input' is up to you, and if you don't want to just write out a blank page you won't want to use document.write
  2.  
  3.  
  4. var input = "[{id:44834,title:'Max Payne Unrated 2008 1080p Blu-ray CEE AVC DTS-HD-SSG',size:'32.14 GB',seeder:1,leecher:0}]";
  5.     var output = eval('(' + input + ')');
  6.     for(var i=0; i<output.length; i++)
  7.     {
  8.         document.write('<table>');
  9.         for(key in output[i])
  10.         {
  11.             document.write('<tr><td>' + key + ':</td><td>' + output[i][key] + '</td></tr>');
  12.         }
  13.         document.write('</table>');
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement