Read James 2:13 Using Other Translations
For he shall have judgment without mercy, that hath shewed no mercy; and mercy rejoiceth against judgment.
For judgment is without mercy to one who has shown no mercy. Mercy triumphs over judgment.
There will be no mercy for those who have not shown mercy to others. But if you have been merciful, God will be merciful when he judges you.