Answers for "immutable js sort ascending and descending order"

0

immutable js sort ascending and descending order

var sorted = data.get('item').sortBy((item) => -item.get('sequence'));
// or var sorted = data.get('item').sortBy((item) => item.get('sequence')).reverse();
// you can now use .map() to go through your OrderedMap which has been
// sortbed by the sequence property and would look like your desired output
Posted by: Guest on July-30-2021

Code answers related to "immutable js sort ascending and descending order"

Code answers related to "Javascript"

Browse Popular Code Answers by Language