Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6799661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:52:30+00:00 2026-05-26T18:52:30+00:00

I doing a little jquery+greasemonkey which I’m trying to use to redo an interface

  • 0

I doing a little jquery+greasemonkey which I’m trying to use to redo an interface of an internal work site I have to use every day to try and make it a little more usable.

I’ve got to the stage of fetching the page and sticking it in a div.
I can use some jquery selectors to identify the data rows of the table im after.

However its old verbose html e.g.

  <tr style="font-family:blaaa">
     <td>1.</td>
     <td><a target="_BLANK" href="url=my bugs">13312800</a></td>
     <td sorttable_customkey="20110512">
       12-MAY-11
     </td>
     <td> Many more tds </td>
 </tr>

I have another tr which has the info i might at one stage like to use as the keys in my json.

Whats the best way to scrape the important data ? I’d like it to ultimately reside in some JSON ? regex ? templates ???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:52:31+00:00Added an answer on May 26, 2026 at 6:52 pm

    You’ll have to do some recursing here, and apply selectors from each TR tag.

    var recordset = [];
    $('table.myTable tr').each(function(i,e) {
        var record = {
           id: $(e).find('td:nthchild(2) a').text(),
           url: $(e).find('td:nthchild(2) a').attr('href'), 
           date: $(e).find('td:nthchild(3)').text(), 
           comment: $(e).find('td:nthchild(4)').text()
        };
        recordset.push(record);
    });
    
    // Here you have complete recorset:
    console.log(recordset);
    
    // To output some JSON in a string
    for (var i = 0; i < recordset.length; i ++) {
       alert($.param(recordset[i]));
    }
    

    If you’d like to output this data using specific DOM try using jQuery templates, particularly {{each}} tags for rendering lists of items, I found them quite easy to use and very flexible for rendering JSON data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing a little app with JQuery, using drag-n-drop for the interface. Basically,
I've been doing a little JavaScript (well, more like jQuery) for a while now
I'm doing some shennanigans with jQuery to put little plus/minus icons next to my
I'm creating a game with points for doing little things, so I have a
I'm doing a little bit of work on a horrid piece of software built
I have been doing a little reading on Flow Based Programming over the last
How do, I've been teaching myself a little basic jQuery recently, doing so I
I've written a little slider script in jQuery which I want to run in
I have two example filename strings: jquery.ui.min.js jquery.ui.min.css What regex can I use to
I'm trying to use the jQuery UI to style my HTML select menu but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.