1Object.entries(obj).forEach(
2 ([key, value]) => console.log(key, value);
3);
1// This solution is for when you want to use
2// `break`, `return` which forEach doesn't support
3for (const key in tempData) {
4 if (tempData.hasOwnProperty(key)) {
5 // your logic here
6 }
7}
8