Problem : I need to convert an object to a map to get the values of key dynamically Solution : The Map constructor takes an array of key-value pairs. Object.entries is a new Object static method available in ES2017 (19.1.2.5) If you need to support older environments and transpilation is not an option for you, […]
Articles taggés:Map
Java 7 – Java 8 – loop Map / List – forEach examples
Java 7 Java 8 loop Map List exemples java 8 foreach examples : Java 7 Java 8 loop Map List exemples : In this article, we will show you how to loop a List and a Map with the new Java 8 forEach statement. forEach and Map : 1 . Normal way to loop a […]