μὴ κρίνετε κατ’ ὄψιν, ἀλλὰ τὴν δικαίαν κρίσιν κρίνετε.
Goodrich, Richard J.; Lukaszewski, Albert L.. A Reader’s Greek New Testament: Third Edition (p. 420). Zondervan Academic. Kindle Edition.
“Do not judge according to the outward appearance but with right judgement judge.” (John 7:24)
Jesus was confronting the Jews of Jerusalem with a simple truth: “Why are you angry with me for making a whole man well on the sabbath when you circumcise men on the sabbath?” They did this to fulfil the law of Moses and Moses got that law from God.
Earlier, back in Jerusalem, he had made this statement about himself “My judgement is right” (John 5:30).
So to judge rightly we must have the mind of Christ about whatever it is we are judging. In this case, his mind was against hypocrisy.