How to delete duplicate elements from associative array and Queue in System Verilog

In reply to javatea:

Common, at the first time I saw the question, I though he wanted to delete a specified element (which already known) in a queue. Turns out, he wanted to remove all duplicated elements and got the unique queue.
However, sometimes you will have the problem that you need my solution code. I give you one example: When you implement scoreboard, you push all expected transactions to a queue (can be duplicated). And you need to remove one by one from the queue after you finish checking/comparing them. You can’t just use .unique method in that queue, right?

About removing 100 different duplicated items, just loop them and remove them from a queue.