var arr=[{text:"abc",value:123},{text:"edf",value:456}];
var comparer=function(op1,op2){
if(op1.text<op2.text){
return -1;
}else if(op1.text>op2.text){
return 1;
}else{
return 0;
}
};
arr.sort(comparer);