The js object is sorted by the number of letters, such as var obj= {'axiomagento baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'}

var obj= {"axiomagronomy Baaaaa"}
how to rank from large to small according to the number of a

Feb.28,2021

obj should be an array

  

first of all, your object definitions are all wrong, right? Should it be an array?
secondly, the key in the object is unordered (in the program implementation, there is no guarantee that the object attributes are stored in order, so you can only extract the key, into an array, sort the array, and then output element information according to the array to ensure orderly output. )

Menu