foreach to interate through dictionary in js code example
Example 1: javascript loop over dictionary
for (const [key, value] of myMap.entries()) {
console.log(key, value);
}
Example 2: javascript loop over dictionary
'use strict';
const object = {'a': 1, 'b': 2, 'c' : 3};
for (const [key, value] of Object.entries(object)) {
console.log(key, value);
}