King Jehoshaphat was desperate, facing a massive army and certain defeat.
How did Jehoshaphat respond to the threat?

He was understandably afraid, but his response demonstrated his faith and dependence on God. First he sought the Lord. Jehoshaphat proclaimed a fast throughout Judah and gathered the people to seek the lord in prayer.
second he prayed humbly. Jehoshaphat stood before the assembly and prayed, acknowledging God's power and sovereignty. Then he prayed, our God, will you not judge them? For we have no power to face this vast army that's attacking us. We do not know what to do, but our eyes are on you.
2 Chronicles 20:12 Third, he waited. He didn't pray and then go. He waited for God's answer.

In response, the Spirit Lord came on Jahaziel, a Levite who delivered a prophetic message. Do not be afraid of discouraged because of this vast army, for the battle is not yours, but God's. Tomorrow march down against them. This is 2nd Chronicles 20:15-17

4th, Jehoshaphat did what God told him to do. When the men of Judah came to the place that overlooks the desert and looked toward the vast army, they saw only dead bodies lying on the ground. God will give you a strategy to overcome your situation. Once you surrender your situation to God and ask him for wisdom and help, he'll answer you wait for his answer.

If you look at the various battles in the Bible where God led the Israelites to victory, often against overwhelming odds, you'll see that God's strategy in each battle is different. So don't think that you know, because we don't. We need God's wisdom to to attack and defeat each problem in our lives.