Salt analysis using spectroscopy
Two of the methods are:

Atomic Absorption Spectroscopy - similar to the flame test, but is usually quantitative. The sample is heated (in a flame or furnace) and the absorbance at a defined wavelength is measured against standardized solutions. It will work for any atom if you use a tunable laser.

ICP/MS (Inductively Coupled Plasma/Mass Spectrometry) - a solution of the compound is ionized and passed into a mass spectrometer. Some atoms (especially halogens) cannot be properly ionized and passed into the mass spectrometer. Oxygen and nitrogen (and a few others) would be difficult to quantify since it may come from impurities in the sample.