Sublimation process can be used to get result. It is a process where solids are first vaporized and then condensed to restore them to solid state. In this case, magnet has to be first used to make iron filling attract to it before proceeding with process of sublimation.