How to differentiate between iron and sodium flames?
Sodium flame is yellow, but all the light is due to two lines in the yellow region. If you look a sodium flame through a purple glass (cobalt glass), the yellow color is absorbed, and you do not see the sodium flame any more. The flame looks dark and colorless through a cobalt glass.
On the contrary iron flame looks yellow, but it is made of a huge number of lines belonging to all regions of the spectrum. The sum of these colors look yellow, but it's a visual effect. The flame contains all colors. If you look at such an iron flame through a cobalt glass, the flame is visible. It looks purple or violet, but it is visible.