data.sort(function(a,b){return a.time>b.time?1:-1});
http://www.w3school.com.cn/jsref/jsref_obj_array.asp