dose of one's own medicine
Also, taste of one's own medicine. Repayment or retaliation, as in It's time we gave them a dose of their own medicine and simply forget to call them back, or Joe was upset at being left out, but they were just giving him a taste of his own medicine. [Late 1800s]
Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.