When you remove the keyboard that comes with your iMac from the accessory box, you'll see the iMac documentation packet. You can find the Lightning to USB cable beneath the documentation packet. The cable looks like this:

Learn more
Learn more about setting up your wireless keyboard, mouse, or trackpad.