JSFiddle - React, Tailwind, and code Playground

by Diman0o

HTML

<script src="http://lightswitch05.github.io/table-to-json/javascripts/jquery.tabletojson.min.js"></script>

<button id="run" class="btn btn-primary">Convert!</button>
<div id="zlp"></div>
<table id='example-table' class="table table-striped">
    <thead>
        <tr>
            <td>id</td>
            <td>two</td>
        <tr>
    </thead>
    <tbody>
       <tr>
       <td>1</td>
       <td>2</td>
   </tr>
    </tbody>
   
</table>

CSS

@import url('http://twitter.github.com/bootstrap/assets/css/bootstrap.css');

JavaScript

$('#run').click( function() {
 /* var table = */
 $('#zlp').html(JSON.stringify( $('#example-table').tableToJSON()));
 $('#example-table').remove();
});