I like JS sort order. The way you can sort an array of objects by the key property to sort it by the value property is very useful. Let’s say you want to sort by the object “number”. The most common way to do it is to use the indexer syntax, but you can also do this with the object or array methods.

One of the interesting things about JS sort order is that it allows you to use the sort.forEach method to iterate through an array of objects.

In this case, I imagine the sort.forEach method will be used to iterate through the objects in the array, but it can be used to iterate through the array itself. This is very useful when we want to loop through the array and we don’t really know what key we’re looking for.

For example, if you were looking for a certain key in an array, you could use the array method to get it, but you could also use the object method to get the object that contains that key. In this case I imagine we’re going to loop through the object in the array and get the object that contains that desired key, but we dont know what key is contained in that object.

So we can use the object method to get the object that contains that key. But what we really want is to loop through the array and get the object thats contained in the array that contains that key. But there is a problem: We dont know in which array the object we want exists. To get the desired object we need to loop through each and every array and then get the object that is contained in each array.

js sort by object property is a method that works with objects, which is why we use it in the first place. But what if we want to sort the array itself? We can use the array method again, but if the array is sorted we can use the array.prototype.sort method to get the desired array.

There is nothing stopping you from doing that. But if you don’t have that option, then you will probably need to go and make a new version for each object, which will also do the trick.

But the problem with this method is that it only works in modern browsers. If you must use it in IE that’s another matter.

The reason that’s so important to me is because I don’t want to have to get out of the “I should do something about the array” mode, especially in IE. Even if you’ve got this sort of thing working you still have to do something about it.

Leave a comment