I have a JSON object jobj=JSON.parse(jsnstr) array returned by JSON.parse and I wish to sort it by its name. I have used
jobj=$(jobj).sort(sortfunction);
function sortfunction(a,b){
return a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1;
};
But this didnt work out instead i am getting undefined obj any help?
jsnstrlooks like?