a taste of their own medicine
US /ə teɪst əv ðɛr oʊn ˈmɛdɪsɪn/
UK /ə teɪst əv ðɛr oʊn ˈmɛdɪsɪn/

1.
по заслугам, получить то же самое
experiencing the same unpleasant treatment that one has given to others
:
•
After all the pranks he played, it was time for him to get a taste of his own medicine.
После всех его шуток пришло время ему получить по заслугам.
•
She was always criticizing others, so it was ironic when she got a taste of her own medicine.
Она всегда критиковала других, поэтому было иронично, когда она получила по заслугам.