how to loop over object in typescript code example
Example 1: object iteration in typescript
Object.entries(obj).forEach(
([key, value]) => console.log(key, value);
);
Example 2: typescript loop over map with value as array
myMap.forEach((value: boolean, key: string) => {
console.log(key, value);
});
Example 3: loop an object properties in ts
Object.keys(obj).forEach(e => console.log(`key=${e} value=${obj[e]}`));