This question has already been answered:
There is an array of the form
var arr = [ { fiels: { name: "a", alt: "a2" }, count: 4 }, { fiels: { name: "b", alt: "3" }, count: 3 }, ]; You need to sort the array in two ways:
- For the value of "fields.name".
- By count.
How can this be realized?