Reputation: 57
How can I sort this by name?
Can anybody help me with that?
Upvotes: 0
Views: 53
Reputation: 37584
You can sort the array beforehand with Array#sort e.g.
Array#sort
underlyings.sort((a, b) => a.name.localeCompare(b.name));
Upvotes: 3