Display the elements of an object. Ex.
const employees = {
"Jacobs": ["Emiel", "Svjetlana", "Ivanna"],
"Ivanna": ["Michael", "Lawson"],
"Emiel": ["John", "Ruby"],
"Lawson": [],
"Michael": ["Lindsay", "Ferguson"],
"Ferguson": []
}
In the example above, let's assume that "Jacobs" is the parent of "Emiel", "Svjetlana", and "Ivanna". We need to print the sequence "Jacobs", "Emiel", "Svjetlana", "Ivanna", which means first the parent followed by the children.
Output should be:
"Jacobs"
"Emiel"
"Svjetlana"
"Ivanna"
"Emiel"
"John"
"Ruby"
"Ivanna"
"Michael"
"Lawson"
"Michael"
"Lindsay"
"Ferguson"