I have a nested javascript object like this:
{
"apple": {
"orange": {
"chilli": {},
"pineapple": {
"mango": {}
}
},
"carrot": {
"cabbage": {},
"onion": {}
}
}
}
i want to get the path (keys) of the deepest nested object. something like apple.orange.pineapple.mango
any help is appriciated :)
{}) acceptable instead of the path to it?