Given data with unknown structure, I would like to find all instances of 'label'.
{
label: 'test',
...,
child: {
label: 'another test',
...,
child: {
label: 'more info',
...,
},
child: {
no-label: 'I do not have a label field',
...,
}
},
}
I would like to return something like the above, just w/out the "other" fields because I would need to know "where" the labels are. The trick is that not all items or children will have a label and the specific structure is unknown at query time. (there may or may not be children on any item, etc.)