"What prayer and supplication soever be made by any man, or by all thy people Israel, which shall know every man the plague of his own heart, and spread forth his hands toward this house: 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 Kings 8:38-39
I've heard the phrase, "Well God knows my heart" (meaning, "He knows I intend to do well"). God knows our heart -- yes, that is true. But do we know what God knows about our heart? It is "deceitful above all things, and desperately wicked" (Jeremiah 17:9). God knows our heart is plagued by sin. He knows that it is impossible for us to "do good" APART from Him indwelling us. The beauty is that, though our heart is wicked, God is willing and able to cleanse our heart and renew a right spirit within us (Psalm 51:10).