Javascript sortable array object