All advancing societies have anti-discrimination laws and yet discrimination is everywhere. This is because laws can't change the heart, they can only regulate the body. God's 'perfect law of love' is better than this.
In this section in James we see how it is sinful to discriminate against people. The way to deal with discrimination is to get a new set of values. Because Christians value Jesus more than anything, we 'judge' people by God's values. And God is love and commands us to love our neighbour.
The way we are empowered to love is because we have been shown such incredible mercy by God. Mercy we did not deserve.
So, those who value Jesus Christ above everything are set free to obey the law of love.
1. Value Jesus above everything
2. Don't discriminate but instead love indiscriminately