I would like to sort immutable.js orderedList by property name
,
data.map(x => x.get("name"))
returns the string, I want to sort my map by name in alphabetical order.
How to do that? I tried:
return data.sortBy((val) => {
if (dir === "up") {
return val.get("name");
} else {
return - val.get("name");
}
});