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

  • Home
  • SEARCH
  • 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 6384825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:49:24+00:00 2026-05-25T02:49:24+00:00

In this bellow table, We can see two items TV and CAR with two

  • 0

In this bellow table, We can see two items TV and CAR with two different prices. I want display both two items with their minimum price without repeating duplicate items.

Sample Table:

<table>
  <tr>
    <th>Items</th>
    <th>Price</th>
  </tr>

  <tr>
    <td>TV</td>
    <td>10000</td>
  </tr>

  <tr>
    <td>TV</td>
    <td>15000</td>
  </tr>

  <tr>
    <td>CAR</td>
    <td>750000</td>
  </tr>

  <tr>
    <td>CAR</td>
    <td>450000</td>
  </tr>   
</table>

Target Table:

    <table>
        <tr>
            <th>Items</th>
            <th>Price</th>
        </tr>
        <tr>
            <td>TV</td>
            <td>10000</td>
        </tr>
        <tr>
            <td>CAR</td>
            <td>450000</td>
        </tr>   
    </table>
  • 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-25T02:49:25+00:00Added an answer on May 25, 2026 at 2:49 am

    Try this.

    var item = {};
    $(".myTable td:first-child").each(function() {
        var key = $(this).text();
        var val = $(this).closest("td").next().text();
        if (!item.hasOwnProperty(key) || item[key] - val > 0) {
            item[key] = val;
        }
    });
    var t ="<tr><th>Items</th><th>Price</th></tr>"
    $.each(item, function(k, v) {
        t += "<tr><td>" + k + "</td><td>" + v + "</td></tr>";
    });
    $(".myTable").html(t);
    

    Demo: http://jsfiddle.net/naveen/uknkS/

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

Sidebar

Related Questions

How can I extract this variable bellow from a website to my android code?
I have a two table. I want to get the below result out from
I want to join these two table but the join key of the second
I had my webpage validated for xhtml transitional till I added this table (see
Dear all from the below mentioned table im picking imgurl with this query but
We have a composite primary key for the site table defined below. Functionally, this
i have done some code in jquery but where i commented in this bellow
How can I make something like this below work? <?PHP $_SESSION['signup_errors']['test1']; $_SESSION['signup_errors']['test2']; $_SESSION['signup_errors']['test3']; $_SESSION['signup_errors']['test4'];
I have a pg table like this: CREATE TABLE order_status_history ( order_id integer NOT
This is a UI question, dealing with HTML and Javascript, to see how to

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.