I have an object that looks like this:
a =
{
b:
{
f: function()
{
console.log("B");
}
}
c:
{
f: function()
{
console.log("C");
}
}
}
How can I iterate through the main object, so the code goes through the main entry of what it contains and then executes their f()
function without mentioning names of each single entry? The "f" can be mentioned.