I have the following fiddle that is my attempt at
Use the function toLowerCase() and convert to string with + ""
myArray.jsonData.sort(function(a, b) {
var comp = ((a[prop]+"").toLowerCase() >
(b[prop]+"").toLowerCase()) ? 1 : -1 ;
return asc ? comp : -comp;
});
If you are always sorting strings, you can use:
function(a,b){
return a.toLowerCase() > b.toLowerCase();
}
which in your example would be:
myArray.jsonData.sort(function(a,b){
var result,
av=a[prop].toLowerCase(),
bv=b[prop].toLowerCase();
return asc ? av > bv : av < bv;
}