Answers for "ts array sort by property"

1

how to sort an array of objects by a property value in javascript

let x = list.sort((a, b) => (a.name > b.name ? 1 : -1));
Posted by: Guest on June-06-2021

Code answers related to "ts array sort by property"

Code answers related to "Javascript"

Browse Popular Code Answers by Language