That could be the battery going out or is out. Not necessarily you ignition switch. That could be pricey that it is that switch. Get your car towed to a gas station or to a dealership ASAP and have them run a diagnostic on that problem ASAP. Once they have done that diagnostic, they will determine if it is an ignition switch or something as simple as the battery out of juice.
Good luck and hope this helps.