map use for each code example
Example 1: foreach map java
Map<String, String> map = ...
for (Map.Entry<String, String> entry : map.entrySet()) {
System.out.println(entry.getKey() + "/" + entry.getValue());
}
Example 2: js foreach key value
Object.keys(obj).forEach(function (key) {
// do something with obj[key]
});