I have tried this but if i do nested loop I cannot able to get the output for that particular nested one
const obj = {
"foo": 'bar',
"baz": 42,
"name": "uday",
"age": 24,
"studies": {
"college": "Jeppiaar"
}
};
Object.entries(obj).forEach(([key, value]) => console.log(`${key}: ${value}`));
If i add many nested loops inside the object variable it should display the output properly.can anyone help me to solve this question please? Thanks in advance.