Jeremiah 17:10 Philosophy

אֲנִ֧י יְהוָ֛ה חֹקֵ֥ר לֵ֖ב בֹּחֵ֣ן כְּלָי֑וֹת וְלָתֵ֤ת לְאִישׁ֙ כדרכו [כִּדְרָכָ֔יו] כִּפְרִ֖י מַעֲלָלָֽיו׃ (ס)

I the LORD search the heart, I try the reins, Even to give every man according to his ways, According to the fruit of his doings.

Read Jewish philosophical commentary on Jeremiah 17:10: and classical philosophical sources.