I have the following function to sort, but, does not sort the accented words correctly
ordenaNomeCompleto: function(a,b){
var ans = 0;
if(a.nome_completo < b.nome_completo) ans = -1
if(a.nome_completo > b.nome_completo) ans = 1
return ans;
},
Searching the Internet I found this method:
ans = a.localeCompare(b)
But, you have the following message in the console
a.localeCompare is not a function
Is there a hint to solve this problem with pure javascript?