Ask of God: That wisdom finds its source in God is axiomatic for the Jewish tradition: “The fear of the Lord is the beginning of wisdom” (Prov 8:22-31). This cosmic wisdom “from above” found its expression also in “the law which Moses commanded us” (Sir 24:23), so that God can declare of his commandments and statues “keep them and do them, for that will be your wisdom and your understanding in the sight of the peoples” (Deut 4:6). It was natural, then, to “ask God” for wisdom, but no figure more exemplified this instinct than Solomon, whose “asking” (aitein) for a discerning heart was answered generously by the Lord (1 Kgs 3:5-15). In Wis 7:7, Solomon is made to say, “Therefore I prayed, and understanding was given to me; I called upon God and the spirit of wisdom came to me.” Bede gets the loci of James’ exhortation perfectly: “How am I to see trials in this light . . . it needs a higher wisdom.” (Luke Timothy Johnson, The Letter of James [AB 37A; Garden City, N.Y.: Doubleday, 1995], 179)
Both Jas 1:5 and 4:2c-3 have a parallel in Matt 7:7, 11 = Luke 11:9, 13. The latter verses are the beginning and ending statements in pericopae (Matt 7:7-11 = Luke 11:9-13) which concern prayer. While some scholars argue for a complex tradition-history behind these synoptic texts, other holds, with better reason, that they defy a history of traditions analysis and conclude that they are unified sections.
Shared by Matthew and Luke and almost identical in wording, these elaborations are, according to most scholars, derived from the common source Q. On the other hand, the differences in the wording and other of Matt 7:9-10 (bread/stone and fish/snake) and Luke 11:11-12 (fish/snake and egg/scorpion), are significant and difficult to explain as either evangelist’s redaction . . . In Matt 7:7-11 = Luke 11:9-13 it is only in the final statements (Matt 7:11 = Luke 11:13) that “asking and receiving” (“seeking” and “knocking”) are clearly related to prayer. Nonetheless, even if the prayer-connection here is due to secondary interpretation, there is nothing in the history of tradition and violates the integrity of these synoptic sections. In other words, already in the sources used by the evangelists these pericopae were unified wholes. It is certainly conceivable that the original elaboration goes back to Jesus.
Against this background, let us look at Jas 1:5 and 4:2c-3. Both concern prayer and share the pertinent lexical terms: αιτειτω . . . και δοθησεται (Jas 1:5) and αιτειτε και . . . λαμβανετε (Jas 4:3; cf. Matt 7:8 = Luke 11:10). Additionally, in Jas 1:5 the reference to God as “the God who gives to all us liberally and does not upbraid,” though clearly different from Matthew’s (“our Father, the one in the heavens, [who] will give good things to those who ask him”) and Luke’s (“the Father, the one from heaven [who] will give the Holy Spirit to those who ask him”), is a linguistic performance that captures the essence of the emphasis on God’s generosity in the Jesus logion. Thus, it appears that in Jas 1:5 the author has recited in his own words the essence of both the fundamental exhortation (Matt 7:7 = Luke 11:9), and the fundamental conclusion (Matt 7:11 = Luke 11:13) of the saying of Jesus in Matt 7:7-11 = Luke 11:9-13. (Luke Timothy Johnson, Brother of Jesus Friend of God: Studies in the Letters of James [Grand Rapids, Mich.: Eerdmans, 2004], 144, 145-46)
Wisdom is necessary in dealing with trials and afflictions; it may be obtained through prayer to God, vs. 5a. With this divine wisdom the readers will be above to endure suffering with patience and to escape ultimate danger and temptation . . . It is likely that James had such sources of “wisdom” [i.e., books] in mind when he advises his readers to strive after the true wisdom that comes only through prayer. (Bo Reicke, The Epistles of Peter, James, and Jude [AB 37; Garden City, N.Y.: Doubleday, 1964], 14; square brackets added for clarification)