I have an object which has both numerics
and alphabets
like below:
{
cc:
{
text:"Vienna",
text:"Austria",
text:"Germany",
text:"245",
text:"121",
}
}
I want to sort them and this is what I have done:
cc.sort((a,b) => a.text > b.text ?1 :-1
But it is not working.
Can anyone help me?