God ordered the whale to swallow Jonah and it swallowed him without harming him because it did not receive an order from God to eat him. Then God ordered the whale to vomit Jonah onto dry land, and it vomited him where it pleased God. I sometimes pause in amazement, contemplating how these creatures received orders from God and how they understood them and carried them out! They have no intellect and cannot discern. It was all due to God's will acting in them.
In the same way that God ordered the great fish to carry out part of the Divine plan, He also gave an order to the little worm. He ordered it to smite the plant, and the plant withered. How amazing to see that even the worm is part of the complete holy act of God. Indeed how beautiful are the words of the Holy Bible: "Take heed that you do not despise one of these little ones" (Matt. 18:10).