The fact is that whatsoever Signs are shown to those who have fallen under Allah’s decree, they will not believe till they see the painful torment.
Then, is there any instance of a habitation that, seeing the torment, accepted the faith and that faith profited it?
(There is no instance of this) except that of Jonah’s people.
When they believed, We warded off the torment of ignominy from them in this worldly life and allowed them to make use of the things of life for a while
The Noble Qur’an in many languages in an easy-to-use interface.
Jonah according to the Quran
The Qur’an says:
So also was Jonah among those sent (by Us).
When he ran away (like a slave from captivity) to the ship (fully) laden,
He (agreed to) cast lots, and he was condemned:
Then the big Fish did swallow him, and he had done acts worthy of blame.
Had it not been that he (repented and) glorified Allah,
He would certainly have remained inside the Fish till the Day of Resurrection.
God forgave Jonah out of His mercy and kindness for the man, and because he knew that Jonah was, at heart, one of the best of men. Therefore, the fish cast Jonah out onto dry land, with Jonah in a state of sickness. God caused a plant to grow where Jonah was lying to provide shade and comfort for him. After Jonah got up, fresh and well, God told him to go back and preach in his land. As the Qur’an says:
But We cast him forth on the naked shore in a state of sickness,
And We caused to grow, over him, a spreading plant of the gourd kind.
And We sent him (on a mission) to a hundred thousand (men) or more.
And they believed; so We permitted them to enjoy (their life) for a while.
Jonah According To The Bible
The plot centers on a conflict between Jonah and God.
God calls up a great storm at sea, and the ship’s crew cast Jonah overboard in an attempt to appease God. A great sea creature sent by God, swallows Jonah. For three days and three nights Jonah languishes inside the fish’s belly. He says a prayer in which he repents for his disobedience and thanks God for His mercy. God speaks to the fish, which vomits out Jonah safely on dry land.
After his rescue, Jonah obeys the call to prophesy against Nineveh, causing the people of the city to repent and God to forgive them.
Jonah is furious, however, and angrily tells God that this is the reason he tried to flee from Him, as he knew Him to be a just and merciful God. He then beseeches God to kill him, a request which is denied when God causes a tree to grow over him, giving him shade. Initially grateful, Jonah’s anger returns the next day, when God sends a worm to eat the plant, withering it, and he tells God that it would be better if he were dead.
God then points out: “You are concerned about the bush, for which you did not labour and which you did not grow; it came into being in a night and perished in a night. And should I not be concerned about Nineveh, that great city, in which there are more than a hundred and twenty thousand people who do not know their right hand from their left, and also many animals?
More details here – The Ordinary Gloss On Jonah
The popular prayer of repentance is not in the chapter of Yunus but is in the chapter of Al-Anbiya’ (The Prophets), verse 87