James is not talking about some academic knowledge but rather wisdom to live rightly in the dailyness of life.
Once you recognize these things we are told to ask God for something. If a person needs wisdom, let him ask. This word almost always carries the idea of a lesser seeking something from a greater (see Matthew 7:7-10; Acts 3:2). Ask is in the Present Imperative meaning, “let him keep on asking.”
When tempted to be weak: keep on asking for strength
When tempted to seek revenge: keep on asking for mercy
When tempted to gossip: keep on asking for a quiet tongue
When tempted to lose your cool: keep on asking for patience
As you ask God, know God. He is a God who gives to all liberally and without reproach. God gives freely and without any ulterior motive. He also gives without reproach. The King James Version says God won’t upbraid when you ask for wisdom. Literally translated from the language of the New Testament, that means God won’t snicker in derision when you ask.
As we ask God we have to learn to receive His answers in faith (James 1:6-7). Philips paraphrases those verses this way: “without secret doubts as to whether he really wants God’s help or not … trusts God, but with inward reservations.” In other words, we must come to God believing His answer is THE answer.
As we ask God we have to ask him without having double-mind (James 1:8). That means we have to come to God with a single desire to obey Him. The prophets had harsh words for God’s people in the Old Testament when they were double-minded. Psalm 12:2 says, “They speak idly everyone with his neighbor; With flattering lips and a double heart they speak.” They called for the people to face in one direction or the other
“And if it seems evil to you to serve the Lord, choose for yourselves this day whom you will serve, whether the gods which your fathers served that were on the other side of the River, or the gods of the Amorites, in whose land you dwell. But as for me and my house, we will serve the Lord.” (Joshua 14:15)
“And Elijah came to all the people, and said, “How long will you falter between two opinions? If the Lord is God, follow Him; but if Baal, follow him.” But the people answered him not a word.” (1 Kings 18:21)
In the midst of your troubles, remember to ask God for wisdom. Have that awareness that God is really present and be prepared to obey him with a singleness of heart.