Given a Value in a RapidJSON document, is it possible to easily find that Value's parent?
Specifically, we're using Pointer to find a value, but we then want to move back up one level to find that value's parent.
I was hoping there would be an easily available GetParent() or even a Pointer statement that would move me up one level, but so far I haven't found it.
All I've come up with is to then iterate through the entire tree, checking child items until I find it. I haven't tried to do that yet, but presumably it's possible (but wildly inefficient).
Help?
Turns out this is dead simple and I'd missed it in reading the JSON Pointer docs. To move up one level from a particular point:
So to move up one level and then descend into a branch named "Foods":
To move up two levels and then descend into a branch named "Simple":