We can know others by the thought and intents (imagination) of their hearts by their fruit (behavior)

[Deuteronomy 31:19-22] Now therefore, write down this song for yourselves, and teach it to the children of Israel; put it in their mouths, that this song may be a witness for Me against the children of Israel. When I have brought them to the land flowing with milk and honey, of which I swore to their fathers, and they have eaten and filled themselves and grown fat, then they will turn to other gods and serve them; and they will provoke Me and break My covenant. Then it shall be, when many evils and troubles have come upon them, that this song will testify against them as a witness; for it will not be forgotten in the mouths of their descendants, for I know the inclination (imagination) of their behavior today, even before I have brought them to the land of which I swore to give them.”

[Matthew 7:16-20] You will know them by their fruits. Do men gather grapes from thornbushes or figs from thistles? Even so, every good tree bears good fruit, but a bad tree bears bad fruit. A good tree cannot bear bad fruit, nor can a bad tree bear good fruit. Every tree that does not bear good fruit is cut down and thrown into the fire. Therefore by their fruits you will know them.