A crane uses a mysterious object ‘X’ to separate magnetic materials from junk. The object ‘X’ is most probably
Electromagnet
The crane has to lift magnetic material during which the object should act as a magnet. But, while dumping it should lose its magnetic properties. So, the crane uses an electromagnet.