Mini Display Port


Hello guys,
I'm planning to use my iMac 27in as an external display for the PC which I'm building.
My iMac has a mini display port and the graphics card has a display port. I have seen that you can switch between the 2.
Just need advise on what cable I require as I can I see mini DP to DP, would that cable work from DP to mini DP ?
Many thanks

Keep safe...