use for in key with typescript code example
Example: typescript key value loop
//< ES 2017:
Object.keys(obj).forEach(key => {
let value = obj[key];
});
//>= ES 2017:
Object.entries(obj).forEach(
([key, value]) => console.log(key, value);
);
//< ES 2017:
Object.keys(obj).forEach(key => {
let value = obj[key];
});
//>= ES 2017:
Object.entries(obj).forEach(
([key, value]) => console.log(key, value);
);