Remove item which on is multiple time in list

Remove item which on is multiple time in list

This is the item list of a module. Here is an item multiple times in list. I want to match item ID and rate if an item is found more than once then I will keep one item there and remove the rest. And the total quantity of all matched items that an item is placed before removing will be saved. If there is an item 3 times, I will leave one there and remove the remaining 2, the remaining 2 will be removed and their quantity will be added with this item which will be in the list. After that I will update the new list again with the data of that module. Is it possible to do this with deluge script? I have tried but I could't. I have attached an attachment of the data list here. I will be happy if someone helps.
    Zoho Marketing Automation

            Zoho Pagesense Resources

              Zoho SalesIQ Resources



                    Zoho TeamInbox Resources

                      Zoho DataPrep Resources



                        Zoho CRM Plus Resources

                          Zoho Books Resources


                            Zoho Subscriptions Resources

                              Zoho Desk Resources

                                Zoho Projects Resources


                                  Zoho Sprints Resources


                                    Qntrl Resources


                                      Zoho Creator Resources


                                        Zoho WorkDrive Resources




                                            Zoho Campaigns Resources

                                              Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now