Currently, I'm trying to get all the keys of an object, including the sub-objects.
I know that
Object.keys(obj)
returns the keys of the object, but not the keys of the objects inside of it.
So, for example, I got following object:
let exampleObject =
{
a: "value",
b: "value",
c: 404,
d: {
e: "value",
f: "value"
}
}
NOTE: The d key might change its name, so it won't work to use something like Object.keys(obj.d).
How do I get e and f in my total list of keys existing inside an object?