IOrderedEnumerable<Dictionary<string, object>> relist = list.OrderBy(i => i["status"]);
//IOrderedEnumerable<Dictionary<string, object>> relist = list.OrderByDescending(i => i["status"]);//反序
給List排序 其中OrderBy的參數是找到一個索引的key值的函數,是 用於提取元素鍵的函數
resultList 是IList<Dictionary<string, object>>類型
resultList= resultList.GroupBy(u => u["ClassroomID"]).Select(p => p.FirstOrDefault()).ToList();
根據Dictionary中的一個Key查重