As far as I am concerned, God turned into good what you meant for evil.
How marvelously God turns everything around for His glory and purposes! Through all his years of suffering and difficulty, Joseph refused to become bitter. His brothers—the means through which his suffering had come—could have been prime targets for Joseph’s blame. But Joseph didn’t play the blame game. What a class act! Joseph’s wisdom gave him the perspective to see God’s work, not the devil’s, in and through his life.
Paul reminds us in Romans 8:28 that “God causes everything to work together for the good of those who love God and are called according to his purpose for them.” God even turned around Pharaoh’s terrible actions of destroying babies so that Moses could be brought to Pharaoh’s daughter!
There is nothing Satan does that will not turn around on him. God will not be defeated or outwitted. Trust Him, refuse to become bitter, and watch Him turn your situation around for good!