取出ArrayList<HashMap<String, Object>>的值

前言

ArrayList<HashMap<String, Object>>简单调用

遍历ArrayList<HashMap<String, Object>>

1
2
3
4
5
6
7
for (Map<String, Object> m : mylist)
{
for (String k : m.keySet())
{
System.out.println(k + " : " + m.get(k));
}
}

取出ArrayList<HashMap<String, Object>>中的某个值

1
2
//取出mylist中,下标为2,key为music_url的值
mylist.get(2).get("music_url");
lewulu!
-------------The End-------------
0%