Instead of accessing a deep object with a known dot notation, I want to do the opposite: build the dot notation string from the keys of the deep object.
So given the following JSON object:
{
great:{
grand:{
parent:{
child:1
},
parent2:1
}
}
}
I’d like to get the following array of paths:
[
"great.grand.parent.child",
"great.grand.parent2"
]
Thanks in advance!
Try this. But I don’t know why you need this.