Jeremiah 17:10 KJV

10 I the LORD search the heart, I try the reins, even to give every man according to his ways, and according to the fruit of his doings.