Javascript Sort Array Of Objects By Two Properties Of Electromagnetic Waves