I have array of objects which are not alphbatically sorted. I want to sort these key names. Is there any way to do this?
const artists = [
{name: "Tupac", year: 1996, age: 25},
{name: "Jayz", year: 2021, age: 48}
]
// Looking for Output like this
const artists = [
{age: 25, name: "Tupac", year: 1996},
{age: 48, name: "Jayz", year: 2021}
]