Read Jonah 3:5-10
Have you ever done the right thing for the wrong reason? This is apparently what Jonah did when he changed his physical direction from going west, and went east to the city of Nineveh. Whether or not he also changed directions spiritually, and repented is another matter. God got his attention in a dramatic way, and he went to proclaim God's message to the city, like it or not. In fact, he did not like it, and his attitude, which is described in the next chapter, proves it. Jonah was afraid that Israel's enemies would repent when they heard God’s message. He was right; they did, from the king to the least of them.
We are commanded in the Sermon on the Mount to "... love our enemies and to pray for those who persecute us..." Do we? It's hard, and it doesn't seem fair. As with Jonah, God doesn't expect, or even require us to like or understand it. He just expects us to be obedient. If we obey, but have a rotten attitude, it just means that we will miss the blessing that comes from a heart that delights to do God's will.
God is not willing that any should perish in their sin (2 Peter 3:9). He died for His enemies. At the very least, we should pray for ours!