Ignition question

I don't know if the problem is the ignition switch or the the lock cylinder on the column. When the car is running, it will die then come right back on. I noticed if I wiggle the key a little that it will stop doing it for awile. Any info is appreciated.
 
Replace the electrical part of the switch. At one time, there was a FREE recall on Ford ignition switches. They overheat and sometimes catch fire.