The remarkable fact about the Golden Rule is independent invention. In the Analects, the disciple Zigong asks whether there is a single word one may practice for an entire life, and Confucius answers with shu, reciprocity: what you do not want done to yourself, do not do to others. In the Babylonian Talmud, a would-be convert challenges Hillel to teach the whole Torah while he stands on one foot, and Hillel replies: what is hateful to you, do not do to your neighbor; that is the whole Torah, the rest is commentary, go and learn it.
In the Sermon on the Mount, Jesus gives the positive form: all things whatsoever ye would that men should do to you, do ye even so to them, for this is the law and the prophets. Three teachers, three centuries apart, with no plausible line of transmission among them, and each not merely stating the rule but crowning it, the one word, the whole Torah, the law and the prophets.
Parallel formulations appear in the Mahabharata, in Jain and Buddhist texts, and in Zoroastrian and Islamic tradition, which is why the rule anchors nearly every modern argument for a shared moral core across religions. The convergence itself is the datum: whatever else divides the traditions, each discovered that the shortest compression of ethics is the instruction to use one's own feelings as the measure of what may be done to another.