Checks if a node is an ancestor of another node in a JSON object