Sort Array By Property Javascript Code