0
我有以下结构获取子值火力地堡
root
-class1
-section1
-student1
-firstname
-lastname
-student2
-firstname
-lastname
-section2
-student1
-firstname
-lastname
-student2
-firstname
-lastname
我需要的部分数(SECTION1,第2节......)并为每节中,姓氏为STUDENT2。
我面对的问题是,它全部在android中的片段类中,我需要显示并且没有任何东西似乎正在工作。我也提到this也是为了让孩子们,但for循环以某种方式不起作用,我得到空值检索。
我需要得到
section1, lastname (of student2 in section1)
section2, lastname (of student2 in section2)
...
and so on until all sections are exhausted
我想看看这一点。谢谢 – evan
获取Object类中的值。 HashMap data =(HashMap )dataSnapshot.getValue(); 然后将对象分解成您想要的值。 –