Js Sort Array Of Objects By String Property Not Properly Set