I have a scope object that has a list containing null values, I would like to sort this list in both directions but the null values must be always at the end. I can probably do this easily by splitting up the object into 2, one with nulls and one without then stick on the null list at the end. But is there a more efficient way to do this?
example:
[1,null,5,7,2,null]
sorted:
ASD: 1,2,5,7,null,null
DESC: 7,5,2,1,null,null