array sort in angular 6

JavaScript
array.sort((a,b) => a.title.rendered.localeCompare(b.title.rendered));

Source

Also in JavaScript: