var arr = [ { id: "1", date: "2018-07-27", time: "10:00-12:00", schedule: "開幕式" }, { id: "2", date: "2018-07-27", time: "12:00-14:00", schedule: "世界盃||今日看點||法國隊" }, { id: "3", date: "2018-07-28", time: "10:00-12:00", schedule: "奧尼爾" }, { id: "4", date: "2018-07-28", time: "15:00-17:00", schedule: "阿拉巴||巴西||俄羅斯" } ] var obj = {};//從新封裝對象 for (var i = 0; i < arr.length; i++) { var item = arr[i];//item if (!obj[item['date']]) { var _arr = []; _arr.push(item); obj[item["date"]] = _arr; } else { obj[item["date"]].push(item); } } console.log(obj) //對象的遍歷 for (var key in obj) { console.log(obj[key]); } var tab = {aa: 11111}; //console.log(tab.aa); //console.log(tab['aa']);