Say I have object:
obj {
1:{
index: 3
},
2:{
index: 1
},
3:{
index: 2
},
4:{
index: 0
}
}
I want to convert it into an array but in orders of "index", so the output should be
[ { index: 0 }, { index: 1 }, { index: 2 }, { index: 3 } ]
So like _.values but ability to sort by a property?
_.valuesetc if you use lodash. Check my answer it is just_.sortByor_.orderByreally since they work on objects etc.