I have an array made up of 80 individual objects. Within those individual objects I have a key: value pair. The key is "number" and values go from "0001" to "0080".
So the structure would be something like
myArray = [{number: "0001"}, {number: "0002"}, {number: "0003"} ]
and so on...
I'm using Underscore, but I'm having trouble figuring out a way to order the individual objects so they're sorted 1,2,3,5. The values that are number are also strings.
Any suggestions?
_.pluck(…, "number")before sorting.