I want to write a query that will fetch the ciphers(nodes) along with its child nodes to the n-level.
e.g. if any child is having 1 child node and that child node is also having a sub child and that sub child node is also having a sub child node and it continues to the n times. then I want to fetch a result like
{
P: {
// parent node info,
child: [
// data
{
a1: {
// data
child: [
{
a2: {
// data
// And so on...
}
}
]
}
},
{
b1: {
// data
child: [
{
b2: {
// data
// And so on...
}
}
]
}
}
]
}
Will return all the nodes in the 'child' path from node P.
'n' specifies the number of hops between P and C with the child relationship.
Will return all the nodes in the 'child' path, irrespective of the number of child relationship hops in-between.
Reference - Specifying varying length paths