Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function html2json() {
- // Remove the "NEW" labels because they cause formatting issues.
- $('.label').remove();
- var result = [];
- $('table tr').each(function(i) {
- // Skip the table header
- if (i === 0) return;
- var row = [];
- $(this).children().each(function(j) {
- // Skip the SHORTLIST | APPLY column
- if (j === 0) return;
- row.push($(this).text().trim());
- });
- result.push(row);
- });
- console.log(JSON.stringify(result));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement