Sort Array of Objects having decimal/dotted numbers [duplicate]
问题 This question already has answers here : Sort version-dotted number strings in Javascript? (15 answers) Closed 4 days ago . how can I sort the below array in ascending order in JS? let obj_list = [{Sno:"1"},{Sno:"4"},{Sno:"3"},{Sno:"9"},{Sno:"9.1"}, {Sno:"9.2"},{Sno:"9.6"},{Sno:"9.3"},{Sno:"9.10"}, {Sno:"9.11"},{Sno:"9.13"},{Sno:"9.12"}]; I tried the normal sort function as written below, but the output was coming incorrect obj_list.sort(function(a,b){ return a.Sno - b.Sno; }); UPDATING the