关于json数据的“分组依据”(特殊结构)

时间:2014-01-11 08:02:30

标签: javascript json group-by sum

我有来自json学生的数据,我需要按类型汇总(此处在EP下面),并仅使用javascript显示最高分的百分比

{
"document_title":"NOTE",
"teacher_name":"AM",
"assignments":[
    {
        "date":"15 jan. 2014",
        "abbr":"EP1",
        "title":"Epreuve 1",
        "type":"EP",
        "max":"100"
    },{
        "date":"16 jan. 2014",
        "abbr":"EP2",
        "title":"Epreuve 2",
        "type":"EP",
        "max":"60"
    }],
"students":[
    {
        "name":"Apprenant 1",
        "points":["75","47"]
    },{
        "name":"Apprenant 2",
        "points":["18","35"]
    },{
        "name":"Apprenant 3",
        "points":["95","57"]
    },{
        "name":"Apprenant 4",
        "points":["60","26"]
    }],
"history":[],
"history_index":0
}

我无法弄明白该怎么做......

0 个答案:

没有答案