function SortCharVal(pColumn, asc) { vCoverageListResponse = vCoverageListResponse.sort(function(vObj1, vObj2) { if (asc) { return (vObj1[pColumn] > vObj2[pColumn]) ? 1 : ((vObj1[pColumn] < vObj2[pColumn]) ? -1 : 0); } else { return (vObj2[pColumn] > vObj1[pColumn]) ? 1 : ((vObj2[pColumn] < vObj1[pColumn]) ? -1 : 0); } }); }