var array = [{  

    "EmployeeName": "John",  

    "Experience": "12",  

    "Technology": "SharePoint"  

}, {  

    "EmployeeName": "Charles",  

    "Experience": "9",  

    "Technology": "ASP.NET"  

}, {  

    "EmployeeName": "Jo",  

    "Experience": "3",  

    "Technology": "JAVA"  

}, {  

    "EmployeeName": "Daine",  

    "Experience": "7",  

    "Technology": "Sql Server"  

}, {  

    "EmployeeName": "Zain",  

    "Experience": "6",  

    "Technology": "C#"  

}];  

 

 

//Comparer Function  

function GetSortOrder(prop) {  

    return function(a, b) {  

        if (a[prop] > b[prop]) {  

            return 1;  

        } else if (a[prop] < b[prop]) {  

            return -1;  

        }  

        return 0;  

    }  

}  

 

 

 

  

array.sort(GetSortOrder("EmployeeName")); //Pass the attribute to be sorted on  

document.write("Sorted Employee Names : ");  

for (var item in array) {  

    document.write("<br>" + array[item].EmployeeName);  

}  

  

array.sort(GetSortOrder("Technology")); //Pass the attribute to be sorted on  

document.write("<br><br> Sorted Technology Names : ");  

for (var item in array) {  

    document.write("<br>" + array[item].Technology);  

}