I am in a situation where I need to sort an array of objects by the name.
Array = [ {id: 3d4, name: A2}, {id: 7b2, name: A1+ Beta}, {id: 9h5, name: A2 Beta}, {id: 1x1, name: A1+} ]
How can I use Ramda to sort it in this order:
- A1+
- A2
- A1+ Beta
- A2 Beta
I already thought of split by name length and then ordering, but I'm stuck on it. Can someone help me with this?
https://stackoverflow.com/questions/67030312/sort-with-ramda April 10, 2021 at 10:35AM
没有评论:
发表评论