Reorder Data in Table using jquery each
问题 I have this set of data pulled from the database. The prices are different but some data are redundant. Here's the screenshot of the data. The table that I want it to look like is this. I arranged them in jQuery using .each() but what I got is an epic fail. Only the header and first body row is correct. Here's my code: var route_price_table = ''; route_price_table = '<table class="table table-bordered table-striped"><thead><tr><th>SEA</th>'; var initial_boxname = ''; var iterator = 0; var