1 Kings 8:39, 1 Chr 28:9, Ps 7:9, Jer 11:20, Acts 1:24, Mt 9:4, Jn 16:30, Rev 2:23

Only God knows the hearts of men. (1 Kings 8:39, 1 Chr 28:9, Ps 7:9, Jer 11:20, Acts 1:24)

1 Kings 8:39 Then hear thou in heaven thy dwelling place, and forgive, and do, and give to every man according to his ways, whose heart thou knowest; (for thou, even thou only, knowest the hearts of all the children of men;)

1 Chr 28:9 And thou, Solomon my son, know thou the God of thy father, and serve him with a perfect heart and with a willing mind: for the Lord searcheth all hearts, and understandeth all the imaginations of the thoughts: if thou seek him, he will be found of thee; but if thou forsake him, he will cast thee off for ever.

Ps 7:9 Oh let the wickedness of the wicked come to an end; but establish the just: for the righteous God trieth the hearts and reins.

Jer 11:20 But, O Lord of hosts, that judgest righteously, that triest the reins and the heart, let me see thy vengeance on them: for unto thee have I revealed my cause.

Acts 1:24 And they prayed, and said, Thou, Lord, which knowest the hearts of all men, shew whether of these two thou hast chosen,

Jesus is the Son of God. So Jesus knows people's hearts. (Jn 2:24-25, Mt 9:4,Jn 16:30, Rev 2:23)

Jn 16:30 Now are we sure that thou knowest all things, and needest not that any man should ask thee: by this we believe that thou camest forth from God.

Jn 2:24 But Jesus did not commit himself unto them, because he knew all men, 25 And needed not that any should testify of man: for he knew what was in man.

Mt 9:4 And Jesus knowing their thoughts said, Wherefore think ye evil in your hearts?

Rev 2:23 And I will kill her children with death; and all the churches shall know that I am he which searcheth the reins and hearts: and I will give unto every one of you according to your works.