immutable js sort ascending and descending order

Solutions on MaxInterview for immutable js sort ascending and descending order by the best coders in the world

showing results for - "immutable js sort ascending and descending order"
Sara Sofía
09 Feb 2018
1var sorted = data.get('item').sortBy((item) => -item.get('sequence'));
2// or var sorted = data.get('item').sortBy((item) => item.get('sequence')).reverse();
3// you can now use .map() to go through your OrderedMap which has been
4// sortbed by the sequence property and would look like your desired output
5