added sort objects by value (js)