I am getting a NAN error when i am using this code to sort a JSON array.
people.sort(function(a, b) {
a = a.title.toLowerCase();
b = b.title.toLowerCase();
return a-b;
})
I am getting a NAN error when i am using this code to sort a JSON array.
people.sort(function(a, b) {
a = a.title.toLowerCase();
b = b.title.toLowerCase();
return a-b;
})