I have a value function which is passed into my orderBy as:
function getValue(item){
return [parseInt(item.approx_value_usd) || -1];
}
This definitely always returns a number array, but for some reason on the front-end AngularJS always orders my items by lexicographical order of the property 'approx_value_usd' e.g.
88 > 82 > 8 > 53 (wrong!)
I feel like I'm missing something but can't seem to get anywhere with this problem.