I have an array returned by a REST query that represents the number of items in a multi-step production process.
var steps = [
{ name:'Package', value:3},
{ name:'Assemble', value:1 },
{ name:'Ship', value:7},
{ name:'Preprocess', value:9 },
{ name:'Paint', value:5 }
];
I'd like to sort them in the order of the process, like this:
- Preprocess
- Paint
- Assemble
- Package
- Ship
I have other alphanumeric sorts that I am doing with Underscore but I cannot figure this one out.
value?9but it's first, so no.