I want to search through a document and get data for Steven and all his children (so in this example James). Is there a way to do it not knowing the path for Steven - so it should be children.children.name - but what if I don't know on which level Steven occurs? Is it even possible in Elasticsearch?
{
name: "John",
a: 1,
b: 2,
children:
[
{
name: Mark,
a: 3,
b: 5,
children:
[
{
name: "Steven",
a: 2,
b: 5,
children: [{ name: "James", a: 1, b: 5 }],
},
],
},
{ name: "David", a: 3, b: 5 }
],
}