var colId="lineName" //排序的字段名称
//对json进行降序排序函数
var desc = function(x,y)
{
return (x[colId] < y[colId]) ? 1 : -1
}
//对json进行升序排序函数
var asc = function(x,y)
{
return (x[colId] > y[colId]) ? 1 : -1
}
data.list.sort(asc); //数据排序