Taste Of One's Own Medicine Meaning

(idiomatic, usually preceded by a) Harsh treatment inflicted on one who previously inflicted similar or equivalent treatment on others.

Example: 1916, Rex Ellingwood Beach, Rainbow's End, ch. 27:
  "The man's spirit is evil enough to frighten people away and we will drop stones upon him, so that he can learn the taste of his own medicine."
1919, Joseph A. Altsheler, The Sun Of Quebec, ch. 5:
  The Long Tom in the stern of the schooner opened fire . . . and two men were seen to go down. The captain laughed. "That's a taste of their own medicine," he said.
2001 June 24, Richard Zoglin, "Hey, Wanna Buy Some Pix?," Time:
  Some stars reportedly even want to investigate the private lives of tabloid editors, to give them a taste of their own medicine.