Check out example codes for "object iteration in typescript". It will help you in understanding the concepts better.

Code Example 1

Object.entries(obj).forEach(
  ([key, value]) => console.log(key, value);
);

Code Example 2

myMap.forEach((value: boolean, key: string) => {
    console.log(key, value);
});

Code Example 3

// This solution is for when you want to use 
// `break`, `return` which forEach doesn't support
for (const key in tempData) {
      if (tempData.hasOwnProperty(key)) {
        // your logic here
      }
}

Learn ReactJs, React Native from akashmittal.com