Java – how to iterate over lists such as list >
•
Java
I have a method to return list < map < string, Object > >
How to iterate like list < map < string, Object > >? Such a list
Solution
Sounds like you're looking for something like this:
List<Map<String,Object>> list; // this is what you have already for (Map<String,Object> map : list) { for (Map.Entry<String,Object> entry : map.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); } }
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码