Passage
But Joshua saved Rahab the harlot, and her father's house, and all she had, and they dwelt in the midst of Israel until this present day: because she hid the messengers whom he had sent to spy out Jericho. At that time, Joshua made an imprecation, saying:
Nearby Context
Joshua 6:23 And the young men went in, and brought out Rahab, and her parents, her brethren also, and all her goods, and her kindred, and made them to stay without the camp.
Joshua 6:24 But they burned the city, and all things that were therein; except the gold and silver, and vessels of brass and iron, which they consecrated unto the treasury of the Lord. _
Joshua 6:25 But Joshua saved Rahab the harlot, and her father's house, and all she had, and they dwelt in the midst of Israel until this present day: because she hid the messengers whom he had sent to spy out Jericho. At that time, Joshua made an imprecation, saying:
Joshua 6:26 Cursed be the man before the Lord, that shall raise up and build the city of Jericho. In his firstborn may he lay the foundation thereof, and in the last of his children set up its gates.
Joshua 6:27 And the Lord was with Joshua, and his name was noised throughout all the land
Study Lenses
The verse centers on "saved", "joshua", "rahab", "harlot", "father's", "house", "dwelt", and "midst". It is saying that the verse draws attention to "saved" and "joshua", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 24's "But they burned the city and all..." into verse 26's "Cursed be the man before the Lord...", so "saved" and "joshua" belong inside that flow. In Joshua context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "saved" and "joshua" with trust shaped by these words, not by a vague optimism outside the passage.