Removing duplicates in child table

In a child table if I have ordered the same product twice, how to I remove the duplicate values from the table. Can someone provide me a working piece of code.

Please check our latest Shopping Cart. Product quantity will be increased if same item is added twice, there will be no duplicate entry.