JavaScript Array of Objects Sorting: How to Sort by a Specific Object Property

A one liner…

books.sort((a, b) => a.title.toLowerCase() < b.title.toLowerCase() ? -1 : 1)
1 Like