複数のフィールドでグループ化し、各学生の最小値を取得する必要があります。私はダーツが初めてなので、実装方法がわかりません。以下は、リアルタイムの firebase テーブル構造の例です。
"gameRanking" : {
"-MmvcDgrGsuCjhcsmXfP" : {
"game" : "Puzzle",
"score" : "105",
"student" : "John Doe",
},
"-MasdDgrGsuCjhcsmXfP" : {
"game" : "Puzzle",
"score" : "99",
"student" : "John Doe",
},
"-Mmw0kagqLrEbdWlkXg7" : {
"game" : "Puzzle",
"score" : "87",
"student" : "Mary Doe",
},
"-MmwC8ONbJUWzP_Wa7X0" : {
"game" : "Puzzle",
"score" : "95",
"student" : "Mary Doe",
}
},
予想される出力は次のとおりです。
Puzzle John Doe 99
Puzzle Mary Doe 87