Check out example codes for "typescript key value loop". It will help you in understanding the concepts better.

Code Example 1

//< ES 2017:

Object.keys(obj).forEach(key => {
  let value = obj[key];
});

//>= ES 2017:

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

Learn ReactJs, React Native from akashmittal.com