Unreal Engine Inventory Slot İndex

I have 2 objects, and I want to delete the second one, but I need to find its index first. How can I determine its index and delete it?