The flat cable, on the iMac display, that you refer to to is the LVDS cable. The RPi does not natively support that cable, since there is no LVDS connector on the RPi. You need to convert the HDMI output from the Pi to LVDS. To do so you need to purchase an adapter, or make a piece of adaptive circuitry.
The HDMI input gets converted to the LVDS that then goes to the display panel. However, each controller will work for a specific resolution (or range of resolutions). Typically up to 1440x900, and then between 1440x900 up to 1920x1200. You MUST select the correct controller for your display panel. Read the descriptions for these controllers carefully and select the correct one.
Note that if the controller has a DVI input, in lieu of HDMI, it is is not a major issue. DVI and HDMI are compatible, you just need a simple $2 plug convertor (HDMI2DVI).
Open the iMac, and take the display out, to be able to access the LVDS cable. The RPi has no connector for the LVDS cable, you have to convert the HDMI to LVDS. The power is supplied via an inverter from the adapter board, and the LCD adapter board is powered by a standard wall wart PSU.
You could follow any one of the answers to the question Connect Pi to an old laptop screen.
However the simplest option is the first answer, which would be to get a LCD Controller board for DIY a laptop—a desktop monitor. Here is another example.
You could use the DSI connector, see this answer, but it is more complex.
For an idea as to how the controller board works, see this video: How to Connect Raspberry Pi to a Laptop LCD Panel via LVDS/LCD Controller Board
If you have a iMac G4, as opposed to a G5, then I believe that TMDS1 is used in lieu of LVDS. Check out the guide, GUIDE: Step by Step 17" iMac G4 TMDS to DVI Conversion - 800mhz and 1/1.25 Ghz Necks Completed. Unfortunately it is too long to reproduce in this answer, or to summarise.
1 See also Transmitting HDMI/DVI over an FPGA with no support for TMDS for an explanation as to the differences between LVDS and TDMS.