+1
Not just others, but while God knows what is in the heart of men, yet He uses both our expression of that as well as that of those we affected as testimony to the character of the heart." "I know thy works, and thy labour, and thy patience, and how thou canst not bear them which are evil: and thou hast tried them which say they are apostles, and are not, and hast found them liars...Nevertheless I have somewhat against thee, because thou hast left thy first love. Remember therefore from whence thou art fallen, and repent, and do the first works; or else I will come unto thee quickly, and will remove thy candlestick out of his place, except thou repent. (Revelation 2:4-5)
Which testimony is also the basis for the sentencing of the wicked:
And the sea gave up the dead which were in it; and death and hell delivered up the dead which were in them: and they were judged every man according to their works. (Revelation 20:13)
However, this does not mean that the heart does not believe unto righteousness, with faith being counted for that, (Rm. 4:5; 10:10) any more than it means that things such as unbelief, lust, covetousness, pride, evil imaginations, etc. in the heart are not sins and a person can be damned just on that basis. For while in judgment God elicits the testimony of what came out of our heart in word and deed, yet what is in the heart of men is enough to condemn or justify one. Thus a mute invalid full paralytic person can both sin in heart and deny the Lord or believe unto righteousness. Which Roman Catholicism even affirms under its "baptism of desire" clause (though some TradCaths deny it). However, God made man to be able to express/reflect Him, and what we do displays what and who we really believe.
Wow...you put words into the mouth of James that James never said.
James did not speak at all about being justified before men but before God. Men cannot justify but God can. Abraham obeyed God in offering Issac therefore he justified before God and by God not before men or by men.