idiom
get a taste of your own medicine
自分のしたことの報いを受ける
Meaning
to be treated in the same unpleasant way that you have treated others
Example
He's always rude to people, so I'm glad he finally **got a taste of his own medicine**.
彼はいつも人に失礼なので、ついに自分のしたことの報いを受けてうれしいです。